stackabuse

Must Watch!

MustWatch



Guide to MapStruct in Java - Advanced Mapping Library

Guide to MapStruct in Java - Advanced Mapping Library Introduction As microservices and distributed applications quickly take over the development world - data integrity and security are more important than ever. A secure communication channel and limited data transfer between these loosely coupled systems are paramount. Most of the time, the end-user or service doesn't need to access the...

Using Mocks for Testing in JavaScript With Jest

Using Mocks for Testing in JavaScript With Jest

Introduction

Jest is a popular, open-source test framework for JavaScript. We can use Jest to create mocks in our test - objects that replace real objects in our code while it's being tested. In our previous series on unit testing techniques using Sinon.js, we covered how we can use

map(), filter(), and reduce() in Python with Examples

map(), filter(), and reduce() in Python with Examples

Introduction

The map(), filter() and reduce() functions bring a bit of functional programming to Python. All three of these are convenience functions that can be replaced with List Comprehensions or loops, but provide a more elegant and short-hand approach to some problems. Before continuing, we'll go over a few things

Handling Events in Node.js with EventEmitter

Handling Events in Node.js with EventEmitter

Introduction

In this tutorial, we are going to take a look at Node's native EventEmitter class. You'll learn about events, what you can do with an EvenEmitter, and how to leverage events in your application. We'll also cover what other native modules extend from the EventEmitter class and some examples

Formatting Strings in Java

Formatting Strings in Java

Introduction

There are multiple ways of formatting Strings in Java. Some of them are old-school and borrowed directly from old classics (such as printf from C) while others are more in the spirit of object-oriented programming, such as the MessageFormat class. In this article, we'll gloss over several of these

Using SCP to Copy and Securely Transfer Files and Folders

Using SCP to Copy and Securely Transfer Files and Folders

Introduction

SCP stands for Secure Copy Protocol. It is a tool that can be used to transfer files from a local host to a remote host, from a remote host to a local host, or between two remote hosts. In this article, we'll examine how to use SCP to copy

Writing to a File with Python's print() Function

Writing to a File with Python's print() Function

Introduction

Python's print() function is typically used to display text either in the command-line or in the interactive interpreter, depending on how the Python program is executed. However, we can change its behavior to write text to a file instead of to the console. In this article, we'll examine the

Using Risk Management and Mitigation in Web Development

Using Risk Management and Mitigation in Web Development

Introduction

Customers and key stakeholders place a lot of trust in the reliability of your web application. They trust that their data is secure from unwanted access on the servers, while still seamlessly allowing wanted access while they¡¯re using it. Many things can happen to compromise data-safety and application

The Bridge Design Pattern with Python

The Bridge Design Pattern with Python Introduction The Bridge Design Pattern is a Structural Design Pattern, which splits the abstraction from the implementation. In this article, we'll be covering the motivation and implementation of the Bridge Design Pattern in Python. Design Patterns refer to a set of standardized practices or solutions to common architectural problems in...

Jump Search in Java

Jump Search in Java

Introduction

Be it searching through a playlist for your favorite song or seeking through a catalog to pick the restaurant to have your next meal in, our lives are filled with searching for things. In quite the same way, computers perform search queries on their data collections and structures. However,

Guide to the Future Interface in Java

Guide to the Future Interface in Java

Introduction

In this article, we will overview the functionality of the Future interface as one of Java's concurrency constructs. We'll also look at several ways to create an asynchronous task, because a Future is just a way to represent the result of an asynchronous computation. The java.util.concurrent package

Encoding and Decoding Base64 Strings in Java

Encoding and Decoding Base64 Strings in Java

Introduction

The process of converting data by applying some techniques/rules into a new format is called encoding. Decoding is the reverse process of encoding - turning the encoded data back to the original format. Encoding is all around us and computers heavily rely on different encoding formats to deliver

Spring Boot with Redis: HashOperations CRUD Functionality

Spring Boot with Redis: HashOperations CRUD Functionality

Introduction

REmote DIctionary Server (Redis) is an in-memory data structure store. It can be used as a simple database, a message broker and for caching through its support for various data structures. In this article, we'll be creating a simple CRUD application and integrating Redis with Spring Boot. To achieve

Guide to Spring Cloud Task: Short-Lived Spring Boot Microservices

Guide to Spring Cloud Task: Short-Lived Spring Boot Microservices

Introduction

Microservices are being developed all around us nowadays. Many of these services are short-lived. Scheduled tasks, data synchronization, data aggregation, report generation and similar services are short-lived. They are typically expected to start, run to completion and end. Many external applications and schedulers have been built to meet this

Reading and Writing JSON Files in Python with Pandas

Reading and Writing JSON Files in Python with Pandas

Introduction

Pandas is one of the most commonly used Python libraries for data handling and visualization. The Pandas library provides classes and functionalities that can be used to efficiently read, manipulate and visualize data, stored in a variety of file formats. In this article, we'll be reading and writing JSON

The Singleton Design Pattern in Python

The Singleton Design Pattern in Python

Introduction

In this article, we'll be diving into the Singleton Design Pattern, implemented in Python. As time progresses, software gets more tailored to solving specific problems in different domains. While there are many difference in the application-level of our software, some aspects of software design remain largely the same. These

The Proxy Design Pattern in Java

The Proxy Design Pattern in Java Introduction The Proxy Design Pattern is a design pattern belonging to the set of structural patterns. Structural patterns are a category of design patterns used to simplify the design of a program on its structural level. As its name suggests, the proxy pattern means using a proxy for some other...

Unpacking in Python: Beyond Parallel Assignment

Unpacking in Python: Beyond Parallel Assignment

Introduction

Unpacking in Python refers to an operation that consists of assigning an iterable of values to a tuple (or list) of variables in a single assignment statement. As a complement, the term packing can be used when we collect several values in a single variable using the iterable unpacking

One-Hot Encoding in Python with Pandas and Scikit-Learn

One-Hot Encoding in Python with Pandas and Scikit-Learn

Introduction

In computer science, data can be represented in a lot of different ways, and naturally, every single one of them has its advantages as well as disadvantages in certain fields. Since computers are unable to process categorical data as these categories have no meaning for them, this information has

Reading and Writing MS Word Files in Python via Python-Docx Module

Reading and Writing MS Word Files in Python via Python-Docx Module The MS Word utility from Microsoft Office suite is one of the most commonly used tools for writing text documents, both simple and complex. Though humans can easily read and write MS Word documents, assuming you have the Office software installed, often times you need to read text from Word

Concurrency in Java: The volatile Keyword

Concurrency in Java: The volatile Keyword

Introduction

Multithreading is a common cause of headaches for programmers. Since humans are naturally not used to this kind of "parallel" thinking, designing a multithreaded program becomes much less straight-forward than writing software with a single thread of execution. In this article, we will take a look at

Reading and Writing CSV Files in Python with Pandas

Reading and Writing CSV Files in Python with Pandas There are many ways of reading and writing CSV files in Python. There are a few different methods, for example, you can use Python's built in open() function to read the CSV (Comma Separated Values) files or you can use Python's dedicated csv module to read and write CSV files.

Guide to Handlebars: Templating Engine for Node/JavaScript

Guide to Handlebars: Templating Engine for Node/JavaScript

Introduction

In this article, we are going to take a look at how to use the Handlebars template engine with Node.js and Express. We'll cover what template engines are and how Handlebars can be used to create Server Side Rendered (SSR) web applications. We will also discuss how to

Does Java "pass-by-reference" or "pass-by-value"?

Does Java "pass-by-reference" or "pass-by-value"?

Introduction

The question pops up a lot both on the internet and when someone would like to check your knowledge of how Java treats variables:
Does Java "pass-by-reference" or "pass-by-value" when passing arguments to methods?
It seems like a simple question (it is), but many people

Converting Callbacks to Promises in Node.js

Converting Callbacks to Promises in Node.js Introduction A few years back, callbacks were the only way we could achieve asynchronous code execution in JavaScript. There were few problems with callbacks and the most noticeable one was "Callback hell". With ES6, Promises were introduced as a solution to those problems. And finally, the async/await...

Guide to JPA with Hibernate: Basic Mapping

Guide to JPA with Hibernate: Basic Mapping

Introduction

The Java Persistence API (JPA) is the persistence standard of the Java ecosystem. It allows us to map our domain model directly to the database structure and then giving us the flexibility of only manipulating objects in our code. This allows us not to dabble with cumbersome JDBC components

Default Arguments in Python Functions

Default Arguments in Python Functions Functions in Python are used to implement logic that you want to execute repeatedly at different places in your code. You can pass data to these functions via function arguments. In addition to passing arguments to functions via a function call, you can also set default argument values in Python

The Observer Design Pattern in Java

The Observer Design Pattern in Java

Introduction

In this article, we'll be implementing the Observer Design Pattern to solve a commonly occurring problem in object-oriented software development. Design Patterns are standardized solutions to common problems in the software development industry. Being familiar with them, a developer is able to recognize where each should be implemented and

Getting Started with Amazon Web Services in Node.js

Getting Started with Amazon Web Services in Node.js

Introduction

Amazon Web Services (AWS) is a cloud computing provider with a number of extremely popular services. Ever since their launch back in 2006, they've become a key player in the development and deployment of major enterprise applications. Their services are scalable, flexible, and groundbreaking in many aspects, while keeping

Simulated Annealing Optimization Algorithm in Java

Simulated Annealing Optimization Algorithm in Java

Introduction

Simulated Annealing is an evolutionary algorithm inspired by annealing from metallurgy. It's a closely controlled process where a metallic material is heated above its recrystallization temperature and slowly cooled. Successful annealing has the effect of lowering the hardness and thermodynamic free energy of the metal and altering its internal

Grid Search Optimization Algorithm in Python

Grid Search Optimization Algorithm in Python

Introduction

In this tutorial, we are going to talk about a very powerful optimization (or automation) algorithm, i.e. the Grid Search Algorithm. It is most commonly used for hyperparameter tuning in machine learning models. We will learn how to implement it using Python, as well as apply it in

Using PostgreSQL with Node.js and node-postgres

Using PostgreSQL with Node.js and node-postgres

Introduction

In this article, we will discuss how to integrate PostgreSQL with Node.js. In order to better follow this article, we'd recommend that you have prior experience using Node.js and SQL statements. We will be using simple javascript ES6 syntax in this article. There are a few different

Removing Stop Words from Strings in Python

Removing Stop Words from Strings in Python In this article, you are going to see different techniques for removing stop words from strings in Python. Stop words are those words in natural language that have a very little meaning, such as "is", "an", "the", etc. Search engines and other enterprise indexing...

Spring HATEOAS: Hypermedia-Driven RESTful Web Services

Spring HATEOAS: Hypermedia-Driven RESTful Web Services

Introduction

REST APIs are flexible and allow developers to make decoupled systems. With the rise of the microservice architecture - REST has matured even more as microservices can be built irrespective of the language or the framework used in the application. Being "in the spotlight" - this means

Binary Search in Java

Binary Search in Java

Introduction

From picking your cherished pair of jeans from your wardrobe to choosing the next movie to watch with your partner, human life is filled with searching for things. While in day-to-day life, humans usually search between a few, if not a dozen, items. Computers have to deal with searching

Factory Method Design Pattern in Java

Factory Method Design Pattern in Java

Introduction

Design patterns are a collection of programming methodologies used in day-to-day programming. They represent solutions to some commonly occurring problems in the programming industry, which have intuitive solutions. Sooner or later, a desktop program, mobile app, or some other type of software will inevitably become complex and start exhibiting

Git: An Introduction for Beginners

Git: An Introduction for Beginners Software development is inherently full of challenges. This ranges from architecting your software, maintaining it, fixing bugs, deploying, and the list goes on. When starting out, you'd think that the easy part would be to share you code with others. After all, they're just text files, right? This may not

Using Sequelize ORM with Node.js and Express

Using Sequelize ORM with Node.js and Express

Introduction

Sequelize is a popular ORM created for Node.js, and in this tutorial we'll be using it to build a CRUD API to manage notes. Interacting with databases is a common task for backend applications. This was typically done via raw SQL queries, which can be difficult to construct,

Git: Adding a Commit Message

Git: Adding a Commit Message As many programmers have found out the hard way, adding documentation is extremely important in being able to easily make modifications to your code, fix issues, pass off to others, etc. Just because your code makes sense now doesn't mean it'll make sense to you in 6 months (or even

Java: Check if String Contains a Substring

Java: Check if String Contains a Substring

Introduction

Checking for substrings within a String is a fairly common task in programming. For example, sometimes we wish to break a String if it contains a delimiter at a point. Other times, we wish to alter the flow if a String contains (or lacks) a certain substring, which could

Introduction to Image Processing in Python with OpenCV

Introduction to Image Processing in Python with OpenCV Introduction In this tutorial, we are going to learn how we can perform image processing using the Python language. We are not going to restrict ourselves to a single library or framework; however, there is one that we will be using the most frequently, the Open CV library. We will...

Guide to Using Optional in Java 8

Guide to Using Optional in Java 8

Introduction

When writing any kind of code in Java, developers tend to work with objects more often than with primitive values (int, boolean, etc). This is because objects are at the very essence of object-oriented programming: they allow a programmer to write abstract code in a clean and structured manner.

The Builder Design Pattern in Java

The Builder Design Pattern in Java

Introduction

In this article, we'll be breaking down the Builder Design Pattern and showing it's application in Java. Design Patterns are simply sets of standardized practices commonly used in the software development industry. They represent solutions, provided by the community, to common problems faced in every-day tasks regarding software development.

JavaScript's Destructuring Assignment

JavaScript's Destructuring Assignment

Introduction

If you wanted to select elements from an array or object before the ES2015 update to JavaScript, you would have to individually select them or use a loop. The ES2015 specification introduced the destructuring assignment, a quicker way to retrieve array elements or object properties into variables. In this

Integrating MongoDB with Python Using PyMongo

Integrating MongoDB with Python Using PyMongo

Introduction

In this post, we will dive into MongoDB as a data store from a Python perspective. To that end, we'll write a simple script to showcase what we can achieve and any benefits we can reap from it. Web applications, like many other software applications, are powered by data.

Java: Check if a File or Directory Exists

Java: Check if a File or Directory Exists

Introduction

Checking if a file or directory exists is a simple and important operation in many tasks. Before accessing a file, we should check if it exists to avoid a NullPointerException. The same goes for directories. While some functions may create a new file/directory if the requested one doesn't

Selection Sort in Python

Selection Sort in Python

Introduction

Sorting, although a basic operation, is one of the most important operations a computer should perform. It is a building block in many other algorithms and procedures, such as searching and merging. Knowing different sorting algorithms could help you better understand the ideas behind the different algorithms, as well

Using Mocks for Testing in JavaScript with Sinon.js

Using Mocks for Testing in JavaScript with Sinon.js

Introduction

Test "mocks" are objects that replace real objects while simulating their functions. A mock also has expectations about how the functions being tested will be used. In some unit test cases we may want to combine the functionality of spies, to observe a method's behavior under call,

The @Value Annotation in Spring

The @Value Annotation in Spring Introduction The main focus of this article is to help you understand how Spring's @Value annotation works. @Value is a Java annotation that is used at the field or method/constructor parameter level and it indicates a default value for the affected argument. It is commonly used for injecting values...

Method Overriding in Java

Method Overriding in Java

Introduction

Object-Oriented Programming (OOP) encourages us to model real-world objects in code. And the thing with objects is that some share outward appearances. Also, a group of them may display similar behavior. Java is an excellent language to cater to OOP. It allows objects to inherit the common characteristics of

Bubble Sort in Python

Bubble Sort in Python

Introduction

For most people, Bubble Sort is likely the first sorting algorithm they heard of in their Computer Science course. It's highly intuitive and easy to "translate" into code, which is important for new software developers so they can ease themselves into turning ideas into a form that

Formatting Strings with the Python Template Class

Formatting Strings with the Python Template Class

Introduction

Python Templates are used to substitute data into strings. With Templates, we gain a heavily customizable interface for string substitution (or string interpolation). Python already offers many ways to substitute strings, including the recently introduced f-Strings. While it is less common to substitute strings with Templates, its power lies

Using fetch to Send HTTP Requests in JavaScript

Using fetch to Send HTTP Requests in JavaScript

Introduction

JavaScript's Fetch API allows us to send HTTP requests. It's been a standard part of JavaScript since ECMAScript 2015 (commonly known as ES6) was introduced and uses Promises. This article will first show you how requests were made with vanilla JavaScript before the Fetch API was developed. We will

Deploying Django Apps to Heroku from GitHub

Deploying Django Apps to Heroku from GitHub

Introduction

Heroku is a popular Platform-as-a-Service (PaaS) that allows developers to run and deploy applications by availing the infrastructure required in terms of hardware and software. This means that we do not have to invest in the hardware and software needed to expose our applications to end-users and this freedom

Using Spies for Testing in JavaScript with Sinon.js

Using Spies for Testing in JavaScript with Sinon.js

Introduction

In software testing, a "spy" records how a function is used when it is tested. This includes how many times it was called, whether it was called with the correct arguments, and what was returned. While tests are primarily used to validate the output of a function,

A Beginner-Level Introduction to MongoDB with Node.js

A Beginner-Level Introduction to MongoDB with Node.js

Introduction

In this article, we are going to talk about how to use the MongoDB database with Node.js. There are couple of ways to do this, including the a popular approach - using an Object Modeling Library. Mongoose is an example of such a library in Node.js, however,

Reactive Programming with Spring 5 WebFlux

Reactive Programming with Spring 5 WebFlux Introduction Spring WebFlux is Spring's response to the rising issue of blocking I/O architecture. As data is becoming more and more crucial in our age, the approaches we take to retrieve and manipulate it changes. Conventionally, most approaches were "blocking", or rather, synchronous. What this means is...

Java Collections: Queue and Deque Interfaces

Java Collections: Queue and Deque Interfaces

Introduction

The Java Collections Framework is a fundamental and essential framework that any strong Java developer should know like the back of their hand. A Collection in Java is defined as a group or collection of individual objects that act as a single object. There are many collection classes in

Spring Cloud: AWS SNS

Spring Cloud: AWS SNS

Introduction

Sending notifications to users is a fairly common task - be it through email, SMS messages, or even through HTTP/HTTPS POST requests. The Simple Notification Service (SNS) is a publisher/subscriber messaging system provided by Amazon Web Services (AWS). It's a popular choice for many developers and very

Text Classification with BERT Tokenizer and TF 2.0 in Python

Text Classification with BERT Tokenizer and TF 2.0 in Python This is the 23rd article in my series of articles on Python for NLP. In the previous article of this series, I explained how to perform neural machine translation using seq2seq architecture with Python's Keras library for deep learning. In this article we will study BERT, which stands for Bidirectional

Text Translation with Google Translate API in Python

Text Translation with Google Translate API in Python Unless you have been hiding under a rock, you have probably used Google Translate on many occasions in your life. Whenever you try to translate a word or a sentence from a certain language to another, it is the Google Translate API which brings you the desired results in the

Using SQLAlchemy with Flask and PostgreSQL

Using SQLAlchemy with Flask and PostgreSQL

Introduction

Databases are a crucial part of modern applications since they store the data used to power them. Generally, we use the Structured Query Language (SQL) to perform queries on the database and manipulate the data inside of it. Though initially done via dedicated SQL tools, we've quickly moved to

String Formatting with Python 3's f-Strings

String Formatting with Python 3's f-Strings

Introduction

Python 3.6 introduced a new way to format strings: f-Strings. It is faster than other string formatting methods in Python, and they allow us to evaluate Python expressions inside a string. In this post, we'll look at the various ways we can format strings in Python. Then we'll

Ensemble/Voting Classification in Python with Scikit-Learn

Ensemble/Voting Classification in Python with Scikit-Learn

Introduction

Ensemble classification models can be powerful machine learning tools capable of achieving excellent performance and generalizing well to new, unseen datasets. The value of an ensemble classifier is that, in joining together the predictions of multiple classifiers, it can correct for errors made by any individual classifier, leading to

Adding a PostgreSQL Database to a Node.js App on Heroku

Adding a PostgreSQL Database to a Node.js App on Heroku Introduction Heroku is a hosting service that supports Node.js applications. It is easy to use and its functionality can be extended with add-ons. There are add-ons for various things, including messaging/queues, logging, metrics, and of course, data stores. The data store add-ons support popular databases, like PostgreSQL, Redis,...

Deploying Spring Boot Applications to Heroku

Deploying Spring Boot Applications to Heroku

Introduction

When developing a web application, the natural progression is to take it online and make it available for end users. To make this task possible, and easier, there are numerous cloud platforms available to choose from to host your application - Heroku is one of them. Heroku provides a

Guide to Overloading Methods in Java

Guide to Overloading Methods in Java

Introduction

Java defines a method as a unit of the tasks that a class can perform. And proper programming practice encourages us to ensure a method does one thing and one thing only. It is also normal to have one method call another method when conducting a routine. Still, you

Variable-Length Arguments in Python with *args and **kwargs

Variable-Length Arguments in Python with *args and **kwargs

Introduction

Some functions have no arguments, others have multiple. There are times we have functions with arguments we don't know about beforehand. We may have a variable number of arguments because we want to offer a flexible API to other developers or we don't know the input size. With Python,

Using Stubs for Testing in JavaScript with Sinon.js

Using Stubs for Testing in JavaScript with Sinon.js

Introduction

Testing is a fundamental part of the software development process. When creating web applications, we make calls to third-party APIs, databases, or other services in our environment. Therefore, our tests must validate those request are sent and responses handled correctly. However, we may not always be able to communicate

Using AWS RDS with Node.js and Express.js

Using AWS RDS with Node.js and Express.js

Introduction

It's not an overstatement to say that information and data runs the world. Almost any application, from social media and e-commerce websites to simple time tracker and drawing apps, relies on the very basic and fundamental task of storing and retrieving data in order to run as expected.

Authentication and Authorization with JWTs in Express.js

Authentication and Authorization with JWTs in Express.js

Introduction

In this article, we will be talking about how JSON Web Tokens works, what are the advantages of them, their structure, and how to use them to handle basic authentication and authorization in Express. You do not have to have any previous experience with JSON Web Tokens since we

Spring Cloud: AWS S3

Spring Cloud: AWS S3

Introduction

Amazon Web Services (AWS) offers a wide range of on-demand and reliable computing services. It does this by hiding the infrastructure management and it's complexities, thus simplifying the process of provisioning and running cloud infrastructure. AWS allows IT companies and developers to focus on creating better solutions for their

Convert Strings to Numbers and Numbers to Strings in Python

Convert Strings to Numbers and Numbers to Strings in Python Introduction Python allows you to convert strings, integers, and floats interchangeably in a few different ways. The simplest way to do this is using the basic str(), int(), and float() functions. On top of this, there are a couple of other ways as well. Before we get in to converting...

Deploying Django Applications to AWS EC2 with Docker

Deploying Django Applications to AWS EC2 with Docker

Introduction

In the fast-paced field of web applications, containerization has become not only common but the preferred mode of packaging and delivering web applications. Containers allow us to package our applications and deploy them anywhere without having to reconfigure or adapt our applications to the deployment platform. At the forefront

Method References in Java 8

Method References in Java 8

Introduction

The sweetest syntactic sugar added to Java up until now are definitely Lambda Expressions. Java is a verbose language and that can get in the way of productivity and readability. Reducing boilerplate and repetitive code has always been a popular task with Java developers, and clean, readable, concise code

JavaScript: Check if String Contains a Substring

JavaScript: Check if String Contains a Substring A common operation in many programming languages is to check if a string contains another string. While it's a simple and common task, the method names often differ between programming languages. For example, here is a small sample of the methods used to achieve this in various languages:

Introduction to Speech Recognition with Python

Introduction to Speech Recognition with Python Speech recognition, as the name suggests, refers to automatic recognition of human speech. Speech recognition is one of the most important tasks in the domain of human computer interaction. If you have ever interacted with Alexa or have ever ordered Siri to complete a task, you have already experienced the

Reading and Writing YAML Files in Java with Jackson

Reading and Writing YAML Files in Java with Jackson

Introduction

YAML files are nowadays being used extensively for defining properties of tools and applications due to the very human-readable syntax. Besides containing configuration properties, they're also often used for data transmission/serialization, similar to how JSON is used. Reading and writing YAML files is quickly becoming a basic developer

NPM: Install Specific Version of a Package

NPM: Install Specific Version of a Package NPM, or the Node Package Manager, is a powerful tool that allows you to easily manage dependencies, run scripts, and organize project metadata. It's main purpose, however is to help you download and install Node packages from its repository to your project. Downloading and installing a package is done using

Storing Data in the Browser with LocalStorage

Storing Data in the Browser with LocalStorage

Introduction

In the early days of the web, data persistence was only possible with a server. Nowadays, through the use of LocalStorage, we can store data on clients like browsers and mobile apps without communicating with a back-end application. In this article, we will discuss how developers can store data

JavaScript's encodeURI Function

JavaScript's encodeURI Function For much of JavaScript's life, it was a browser-only programming language and could not run on the server-side like it can now. Because of this, JS has a lot of built-in functions that are specific to browser-side functions, like encoding strings for use in URLs. Some of the most commonly...

Java Collections: The Map Interface

Java Collections: The Map Interface

Introduction

The Java Collections Framework is a fundamental and essential framework that any strong Java developer should know like the back of their hand. A Collection in Java is defined as a group or collection of individual objects that act as a single object. There are many collection classes in

Heap Sort in Python

Heap Sort in Python

Introduction

Heap Sort is another example of an efficient sorting algorithm. Its main advantage is that it has a great worst-case runtime of O(n*logn) regardless of the input data. As the name suggests, Heap Sort relies heavily on the heap data structure - a common implementation of a

Working with PostgreSQL in Java

Working with PostgreSQL in Java

Introduction

PostgreSQL (which goes by the moniker Postgres) is famous for its object-relational nature. In contrast, other database systems are usually relational. Due to its nature, it's a great pairing with Java, which is heavily object-oriented. Accessing a Postgres database using Java requires you to rely on the JDBC API

How to Get the Current Date and Time in Python

How to Get the Current Date and Time in Python

Introduction

Logging, saving records to the database, and accessing files are all common tasks a programmer works on. In each of those cases, date and time play an important role in preserving the meaning and integrity of the data. Programmers often need to engage with date and time. In this

JavaScript's Immediately Invoked Function Expressions

JavaScript's Immediately Invoked Function Expressions

Introduction

Defining and calling functions are key practices for mastering JavaScript and most other programming languages. Usually, a function is defined before it is called in your code. Immediately-Invoked Function Expressions (IIFE), pronounced "iffy", are a common JavaScript pattern that executes a function instantly after it's defined. Developers

Working with Redis in Python with Django

Working with Redis in Python with Django

Introduction

Data is increasingly becoming a valuable commodity in the current era of technology and this necessitates the optimization of storage and access to this data. There are quite a few notable solutions for the storage of data, including Relational Database Management Systems (RDBMS) such as MySQL and PostgreSQL, which

Deploying a Node.js App to Heroku

Deploying a Node.js App to Heroku

Introduction

There are numerous free hosting services available for getting your Node.js applications up and running publicly. One of these services is Heroku, that allows you to deploy, manage and scale your applications on the web. In this article we'll be building a simple Node and Express.js application

Deploying Node.js Apps to AWS EC2 with Docker

Deploying Node.js Apps to AWS EC2 with Docker Introduction Once you've written a web application, there are dozens of offerings to get your app online and usable by other people. One well known offering is part of the Amazon Web Services (AWS) platform - Elastic Compute Cloud (EC2). EC2 is a core part of AWS, and a lot...

Executing Shell Commands with Node.js

Executing Shell Commands with Node.js

Introduction

System administrators and developers frequently turn to automation to reduce their workload and improve their processes. When working with servers, automated tasks are frequently scripted with shell scripts. However, a developer might prefer to use a more general higher-level language for complex tasks. Many applications also need to interact

Creational Design Patterns in Python

Creational Design Patterns in Python

Overview

This is the first article in a short series dedicated to Design Patterns in Python.

Creational Design Patterns

Creational Design Patterns, as the name implies, deal with the creation of classes or objects. They serve to abstract away the specifics of classes so that we'd be less dependent on

Design Patterns in Python

Design Patterns in Python

Introduction

Design Patterns are reusable models for solving known and common problems in software architecture. They're best described as templates for dealing with a certain usual situation. An architect might have a template for designing certain kinds of door-frames which he fits into many of his projects, and a software

Handling Authentication in Express.js

Handling Authentication in Express.js

Introduction

In this article, we are going to make a simple app to demonstrate how you can handle authentication in Express.js. Since we will be using some basic ES6 syntaxes and the Bootstrap framework for UI design, it might help if you have some basic knowledge about those technologies.

Merge Sort in Python

Merge Sort in Python

Introduction

Merge Sort is one of the most famous sorting algorithms. If you're studying Computer Science, Merge Sort, alongside Quick Sort is likely the first efficient, general-purpose sorting algorithm you have heard of. It is also a classic example of a divide-and-conquer category of algorithms.

Merge Sort

The way Merge

Encoding and Decoding Base64 Strings in Python

Encoding and Decoding Base64 Strings in Python

Introduction

Have you ever received a PDF or an image file from someone via email, only to see strange characters when you open it? This can happen if your email server was only designed to handle text data. Files with binary data, bytes that represent non-text information like images, can

Executing Shell Commands with Python

Executing Shell Commands with Python

Introduction

Repetitive tasks are ripe for automation. It is common for developers and system administrators to automate routine tasks like health checks and file backups with shell scripts. However, as those tasks become more complex, shell scripts may become harder to maintain. Fortunately, we can use Python instead of shell

Creating Command Line Utilities with Python's argparse

Creating Command Line Utilities with Python's argparse Introduction Most of the user-facing software comes with a visually pleasing interface or via a decorated webpage. At other times, a program can be so small that it does not warrant an entire graphical user interface or web application to expose its functionality to the end-user. In these cases, we...

Serving Files with Python's SimpleHTTPServer Module

Serving Files with Python's SimpleHTTPServer Module

Introduction

Servers are computer software or hardware that processes requests and deliver data to a client over a network. Various types of servers exist, with the most common ones being web servers, database servers, application servers, and transaction servers. Widely used web servers such as Apache, Monkey, and Jigsaw are

List Comprehensions in Python

List Comprehensions in Python A list is one of the fundamental data types in Python. Every time you come across a variable name that's followed by a square bracket [], or a list constructor, it is a list capable of containing multiple items, making it a compound data type. Similarly, it is also a breeze

Tensorflow 2.0: Solving Classification and Regression Problems

Tensorflow 2.0: Solving Classification and Regression Problems After much hype, Google finally released TensorFlow 2.0 which is the latest version of Google's flagship deep learning platform. A lot of long-awaited features have been introduced in TensorFlow 2.0. This article very briefly covers how you can develop simple classification and regression models using TensorFlow 2.0.

Publishing and Subscribing to AWS SNS Messages with Node.js

Publishing and Subscribing to AWS SNS Messages with Node.js

Introduction

A lot of technology that we see relies on a very immediate request/response cycle - when you make a request to a website, you get a response containing the website you requested, ideally immediatelly. This all relies on the user making the active decision to request that data.

Stochastic Optimization: Random Search in Java

Stochastic Optimization: Random Search in Java

Introduction

Stochastic Optimization refers to a category of optimization algorithms that generate and utilize random points of data to find an approximate solution. While brute-force algorithms do provide us with the best solution, they're terribly inefficient. This isn't an issue with smaller datasets, but most real-life problems and search-spaces require

Getting Started with Postman

Getting Started with Postman

Introduction

Testing an application means more than just clicking around until something breaks or trying different inputs until something isn't working right. While this is a good way to find anything that might break on the user facing side of the application, due to misuse - what is being neglected

Unit Testing in Python with Unittest

Unit Testing in Python with Unittest

Introduction

In almost all fields, products are thoroughly tested before being released to the market to ensure its quality and that it works as intended. Medicine, cosmetic products, vehicles, phones, laptops are all tested to ensure that they uphold a certain level of quality that was promised to the consumer.

Sorting Arrays in JavaScript

Sorting Arrays in JavaScript Like many other popular languages, JavaScript conveniently comes with a built-in method for sorting arrays. While the end result is the same, the various JavaScript engines implement this method using different sort algorithms: V8: Quicksort or Insertion Sort (for smaller arrays) Firefox: Merge sort Safari: Quicksort, Merge Sort, or Selection...

Insertion Sort in Java

Insertion Sort in Java

Introduction

Sorting is a crucial aspect of digesting data. For us humans, it's much more natural to sort things that have something in common like the date of publishing, alphabetical order, articles belonging to an author, from smallest to largest, etc. This makes it a lot easier to comprehend the

Insertion Sort in Python

Insertion Sort in Python

Introduction

If you're majoring in Computer Science, Insertion Sort is most likely one of the first sorting algorithms you have heard of. It is intuitive and easy to implement, but it's very slow on large arrays and is almost never used to sort them. Insertion sort is often illustrated by

Git: Ignore Files with .gitignore

Git: Ignore Files with .gitignore Git is a great tool for tracking all of the files in a project, whether you have only a few to track or thousands. But just because a file exists in your project doesn't mean you automatically want to keep track of it and its changes over the lifetime of

Dimensionality Reduction in Python with Scikit-Learn

Dimensionality Reduction in Python with Scikit-Learn

Introduction

In machine learning, the performance of a model only benefits from more features up until a certain point. The more features are fed into a model, the more the dimensionality of the data increases. As the dimensionality increases, overfitting becomes more likely. There are multiple techniques that can be

Merge Sort in Java

Merge Sort in Java

Introduction

Sorting is a crucial aspect of digesting data. For us humans, it's much more natural to sort things that have something in common like the date of publishing, alphabetical order, articles belonging to an author, from smallest to largest, etc. This makes it a lot easier to comprehend the

Using cURL in Python with PycURL

Using cURL in Python with PycURL

Introduction

In this tutorial, we are going to learn how to use PycURL, which is an interface to the cURL library in Python. cURL is a tool used for transferring data to and from a server and for making various types of data requests. PycURL is great for testing REST

Quicksort in Python

Quicksort in Python

Introduction

Quicksort is a popular sorting algorithm and is often used, right alongside Merge Sort. It's a good example of an efficient sorting algorithm, with an average complexity of O(nlogn). Part of its popularity also derives from the ease of implementation. We will use simple integers in the first

Message Queueing in Node.js with AWS SQS

Message Queueing in Node.js with AWS SQS Introduction With the increased complexity of modern software systems, came along the need to break up systems that had outgrown their initial size. This increase in the complexity of systems made it harder to maintain, update, and upgrade them. This paved the way for microservices that allowed massive monolithic systems...

Introduction to JavaScript Proxies in ES6

Introduction to JavaScript Proxies in ES6

Introduction

In this article, we are going to talk about JavaScript proxies which were introduced with JavaScript version ECMAScript 6 (ES6). We will use some of the existing ES6 syntax, including the spread operator in this article. So it will be helpful if you have some basic knowledge about ES6.

Deploying a Node.js App to a DigitalOcean Droplet with Docker

Deploying a Node.js App to a DigitalOcean Droplet with Docker

Introduction

JavaScript has come a long way over the years, and we're now at a point where you can write and deploy a web application very easily. Frameworks like Express, Sails, and Meteor have only made this easier. Following most tutorials on the internet means you'll be working on your

Advanced OpenGL in Python with PyGame and PyOpenGL

Advanced OpenGL in Python with PyGame and PyOpenGL

Introduction

Following the previous article, Understanding OpenGL through Python where we've set the foundation for further learning, we can jump into OpenGL using PyGame and PyOpenGL. PyOpenGL is the standardized library used as a bridge between Python and the OpenGL APIs, and PyGame is a standardized library used for making

Scheduling Spring Boot Tasks

Scheduling Spring Boot Tasks

Introduction

Scheduling tasks to be performed at a later date, or repeated in a fixed interval, is a very useful feature. For example, newsletter systems or tasks which process information at a set timeframe rely on being scheduled to run at certain time points. Since Spring Boot offers several options,

Get HTTP POST Body in Express.js

Get HTTP POST Body in Express.js

Introduction

In this brief article we'll be going over how to extract information from a POST body in Express.js. The HTTP protocol provides a number of ways to pass information from a client to a server, with POST bodies being the most flexible and most commonly used method to

Monitoring with Spring Boot Actuator

Monitoring with Spring Boot Actuator

Overview

In this article, we'll look into Spring Boot Actuator, which provides built-in production ready endpoints that can be used for monitoring and controlling your application. Monitoring applications may include something as simple as knowing the Health and Info to some complex data like understanding Traffic and Metrics for our

Understanding OpenGL through Python

Understanding OpenGL through Python

Introduction

Following this article by Muhammad Junaid Khalid, where basic OpenGL concepts and setup was explained, now we'll be looking at how to make more complex objects and how to animate them. OpenGL is very old, and you won't find many tutorials online on how to properly use it and

Object Oriented Design Principles in Java

Object Oriented Design Principles in Java Introduction Design principles are generalized pieces of advice or proven good coding practices that are used as rules of thumb when making design choices. They're a similar concept to design patterns, the main difference being that design principles are more abstract and generalized. They are high-level pieces of advice, often...

Reading and Writing YAML to a File in Node.js/JavaScript

Reading and Writing YAML to a File in Node.js/JavaScript

Introduction

In last few years YAML, which stands for YAML Ain't Markup Language, has become very popular for use in storing data in a serialized manner, typically configuration files. Since YAML essentially is a data format, the YAML specification, is fairly brief. Thus, the only functionality required of YAML libraries

Introduction to Node.js Streams

Introduction to Node.js Streams

Introduction

Streams are a somewhat advanced concept to understand. So in this article, we will go along with some examples for a better understanding and introduce you to a few concepts along the way.

What is a Stream

In simple terms, streams are used to read from input or write

Coroutines in Python

Coroutines in Python

Introduction

Every programmer is acquainted with functions - sequences of instructions grouped together as a single unit in order to perform predetermined tasks. They admit a single entry point, are capable of accepting arguments, may or may not have a return value, and can be called at any moment during

Asynchronous Tasks Using Flask, Redis, and Celery

Asynchronous Tasks Using Flask, Redis, and Celery

Introduction

As web applications evolve and their usage increases, the use-cases also diversify. We are now building and using websites for more complex tasks than ever before. Some of these tasks can be processed and feedback relayed to the users instantly, while others require further processing and relaying of results

Time Series Prediction using LSTM with PyTorch in Python

Time Series Prediction using LSTM with PyTorch in Python Time series data, as the name suggests is a type of data that changes with time. For instance, the temperature in a 24-hour time period, the price of various products in a month, the stock prices of a particular company in a year. Advanced deep learning models such as Long

Bubble Sort in Java

Bubble Sort in Java

Introduction

Sorting is a crucial aspect of digesting data. For us humans, it's much more natural to sort things that have something in common like the date of publishing, alphabetical order, articles belonging to an author, from smallest to largest, etc... This makes it a lot easier to comprehend the

Handling File Uploads in Node.js with Express and Multer

Handling File Uploads in Node.js with Express and Multer

Introduction

Users don't only consume data, they also produce data and upload it. They can send data through applications like messengers or email to specific recipients or upload files to social networks and data streaming platforms such as Facebook or YouTube. That being said, almost every interactive website today supports

Monitoring Spring Boot Apps with Micrometer, Prometheus, and Grafana

Monitoring Spring Boot Apps with Micrometer, Prometheus, and Grafana Introduction Monitoring an application's health and metrics helps us manage it better, notice unoptimized behavior and get closer to its performance. This especially holds true when we're developing a system with many microservices, where monitoring each service can prove to be crucial when it comes to maintaining our system. Based...

Introduction to PyTorch for Classification

Introduction to PyTorch for Classification PyTorch and TensorFlow libraries are two of the most commonly used Python libraries for deep learning. PyTorch is developed by Facebook, while TensorFlow is a Google project. In this article, you will see how the PyTorch library can be used to solve classification problems. Classification problems belong to the category

Serving Static Files with Node and Express.js

Serving Static Files with Node and Express.js

Introduction

In this article, we are going to a build simple app to serve static files like HTML files, CSS files, and images using Node.js and Express.

Configuring the Project and Installing Express

To get started, let's create a new Node.js project by running the init command in

Shell Sort in Java

Shell Sort in Java

Introduction

Sorting algorithms are algorithms that rearrange a collection's members in a certain order. The order criteria can vary and it is typically user-defined. In practice, the order criteria is provided to the algorithm as a method that compares two objects and returns:

How to Install and Set Up MySQL Server on Windows

How to Install and Set Up MySQL Server on Windows

Introduction

MySQL is the most widely used Relational Database Management System (RDBMS) in the world, supplying around a third of current applications with data. MySQL uses a standardized SQL data language and works on many operating systems with drivers that allow developers to connect with all of the popular programming

Uploading Files to AWS S3 with Python and Django

Uploading Files to AWS S3 with Python and Django

Introduction

In the quest to build more interactive websites, we don't only relay information to users but also allow them to upload data of their own. This opens up more opportunities and more ways that our websites can serve the end-users. By allowing users to upload files, we can allow

Building a REST API with Node and Express

Building a REST API with Node and Express

Introduction

In this tutorial, we are going to build a REST API to manage books with Node.js and Express. To get started with it, I assume that you have Node.js installed, you have some experience in JavaScript, and some basic knowledge of HTML and Bootstrap. For the sake

Autoencoders for Image Reconstruction in Python and Keras

Autoencoders for Image Reconstruction in Python and Keras

Introduction

Nowadays, we have huge amounts of data in almost every application we use - listening to music on Spotify, browsing friend's images on Instagram, or maybe watching an new trailer on YouTube. There is always data being transmitted from the servers to you. This wouldn't be a problem for

One-Hot Encoding

One-Hot Encoding In computer science and electronics, there are quite a few ways to represent data, often called encoding schemes. Each has its own purpose, advantages, and disadvantages. In this short article we'll take a look at one-hot encoding and see what it is, how it compares to other similar schemes, and...

Python for NLP: Neural Machine Translation with Seq2Seq in Keras

Python for NLP: Neural Machine Translation with Seq2Seq in Keras This is the 22nd article in my series of articles on Python for NLP. In one of my previous articles on solving sequence problems with Keras, I explained how to solve many to many sequence problems where both inputs and outputs are divided over multiple time-steps. The seq2seq architecture is

Getting Started with Python PyAutoGUI

Getting Started with Python PyAutoGUI

Introduction

In this tutorial, we're going to learn how to use pyautogui library in Python 3. The PyAutoGUI library provides cross-platform support for managing mouse and keyboard operations through code to enable automation of tasks. The pyautogui library is also available for Python 2; however, we will be using Python

Promises in Node.js

Promises in Node.js

Introduction

JavaScript is single-threaded, which means that everything, including events, runs on the same thread. If the thread is not free, code execution is delayed until it is. This can be a bottleneck for our application since it can really cause serious performance problems. There are different ways by which

Programming Language Processors

Programming Language Processors

Introduction

Nowadays, most programs are written in a high-level language such as C, Java, or Python. These languages are designed more for people, rather than machines, by hiding some hardware details of a specific computer from the programmer. Simply put, high-level languages simplify the job of telling a computer what

Solving Systems of Linear Equations with Python's Numpy

Solving Systems of Linear Equations with Python's Numpy The Numpy library can be used to perform a variety of mathematical/scientific operations such as matrix cross and dot products, finding sine and cosine values, Fourier transform and shape manipulation, etc. The word Numpy is short-hand notation for "Numerical Python". In this article, you will see how

File Management with AWS S3, Python, and Flask

File Management with AWS S3, Python, and Flask

Introduction

One of the key driving factors to technology growth is data. Data has become more important and crucial in the tools being built as technology advances. It has become the driving factor to technology growth, how to collect, store, secure, and distribute data. This data growth has led to

Uploading Files to AWS S3 with Node.js

Uploading Files to AWS S3 with Node.js

Introduction

Much of the software and web apps we build today requires some kind of hosting for files - images, invoices, audio files, etc. The traditional way to store files was just to just save them on the server's HDD. However, saving files onto the HDD of the server comes

Python for NLP: Deep Learning Text Generation with Keras

Python for NLP: Deep Learning Text Generation with Keras This is the 21st article in my series of articles on Python for NLP. In the previous article, I explained how to use Facebook's FastText library for finding semantic similarity and to perform text classification. In this article, you will see how to generate text via deep learning technique in...

Analyzing API Data with MongoDB, Seaborn, and Matplotlib

Analyzing API Data with MongoDB, Seaborn, and Matplotlib

Introduction

A commonly requested skill for software development positions is experience with NoSQL databases, including MongoDB. This tutorial will explore collecting data using an API, storing it in a MongoDB database, and doing some analysis of the data. However, before jumping into the code let's take a moment to go

Graphs in Java: Dijkstra's Algorithm

Graphs in Java: Dijkstra's Algorithm

Introduction

Graphs are a convenient way to store certain types of data. The concept was ported from mathematics and appropriated for the needs of computer science. Due to the fact that many things can be represented as graphs, graph traversal has become a common task, especially used in data science

Graphs in Java: Breadth-First Search (BFS)

Graphs in Java: Breadth-First Search (BFS)

Introduction

Graphs are a convenient way to store certain types of data. The concept was ported from mathematics and appropriated for the needs of computer science. Due to the fact that many things can be represented as graphs, graph traversal has become a common task, especially used in data science

Graphs in Java: Depth-First Search (DFS)

Graphs in Java: Depth-First Search (DFS)

Introduction

Graphs are a convenient way to store certain types of data. The concept was ported from mathematics and appropriated for the needs of computer science. Due to the fact that many things can be represented as graphs, graph traversal has become a common task, especially used in data science

Uploading Files with Spring Boot

Uploading Files with Spring Boot

Introduction

Uploading files to a website isn't an uncommon task, but it also isn't very straightforward to achieve. Some use-cases for why you'd want to upload a file to a website includes services that offer online file conversions and photo sharing websites. In certain applications, we might even want to

Graphs in Java: Representing Graphs in Code

Graphs in Java: Representing Graphs in Code

Introduction

Graphs are a convenient way to store certain types of data. The concept was ported from mathematics and appropriated for the needs of computer science. Due to the fact that many things can be represented as graphs, graph traversal has become a common task, especially used in data science

Graphs in Java

Graphs in Java

Introduction

Graphs are a convenient way to store certain types of data. The concept was "stolen" from mathematics and appropriated for the needs of computer science. There are several ways in which we can describe what graphs are. We will approach graphs first in a highly simplified way,

Git: Switch Branch

Git: Switch Branch In Git, branches allow you to create different versions of your code from a snapshot in the repository. So if you have a new feature to develop, a bug to fix, or code to rewrite, you can easily create a branch that won't affect the master branch of your codebase....

Solving Sequence Problems with LSTM in Keras: Part 2

Solving Sequence Problems with LSTM in Keras: Part 2 This is the second and final part of the two-part series of articles on solving sequence problems with LSTMs. In the part 1 of the series, I explained how to solve one-to-one and many-to-one sequence problems using LSTM. In this part, you will see how to solve one-to-many and many-to-many

Git: Remove a File

Git: Remove a File As your project changes over time, at some point you'll likely need to remove a file, or an entire directory, from the repository. Since this involves more than changing the contents of a file, Git has a special command to handle removing files, which also takes some important flags depending

Git: Create a New Repository

Git: Create a New Repository When starting a new project, one of the first things you'll find yourself needing to do is creating a new Git repository. This not only helps you share the project with coworkers, or publicly, but it's also a great way to track updates to a young project that is bound

Reading and Writing YAML to a File in Python

Reading and Writing YAML to a File in Python

Introduction

In this tutorial, we're going to learn how to use the YAML library in Python 3. YAML stands for Yet Another Markup Language. In recent years it has become very popular for its use in storing data in a serialized manner for configuration files. Since YAML essentially is a

Solving Sequence Problems with LSTM in Keras

Solving Sequence Problems with LSTM in Keras In this article, you will learn how to perform time series forecasting that is used to solve sequence problems. Time series forecasting refers to the type of problems where we have to predict an outcome based on time dependent inputs. A typical example of time series data is stock market

Java: List Files in a Directory

Java: List Files in a Directory

Introduction

A lot of applications handle files in some way and file manipulation is one of the core knowledges in any programming language. In order to manipulate files, we need to know where they're located. Having an overview of files in a directory is paramount if we want to accomplish

Deploying a Flask Application to Heroku

Deploying a Flask Application to Heroku

Introduction

In this tutorial you will learn how to deploy a Flask application to Heroku. The app can be as simple as a "Hello World" app to a social media monitoring platform! Nowadays there is no business that doesn't have a web app to help it a reach

Java Flow Control: break and continue Statements

Java Flow Control: break and continue Statements Introduction Conditional statements and loops are a very important tool in programming. There aren't many things we could do with code that can only execute line-by-line. That's what "flow control" means - guiding the execution of our program, instead of letting it execute line-by-line regardless of any internal...

Spring Cloud: Contract

Spring Cloud: Contract

Overview

In this article, we'll introduce you to Spring Cloud Contract, which is Spring's response to Consumer-Driven Contracts. Nowadays, applications are thoroughly tested - whether it be unit tests, integration tests, or end-to-end tests. It's very common in a microservice architecture that a service (consumer) communicates with another service (producer

Git: Clone a Repository

Git: Clone a Repository One of the many benefits of using version control software like Git is how easily you can copy the entire contents and history of a project with a simple command in your terminal. Once on your local machine, you can then make the changes/additions/deletions that you want, and

Java Flow Control: for and for-each Loops

Java Flow Control: for and for-each Loops

Introduction

Conditional statements and loops are a very important tool in programming. There aren't many things we could do with code that can only execute line-by-line. That's what "flow control" means - guiding the execution of our program, instead of letting it execute line-by-line regardless of any internal

Object Detection with ImageAI in Python

Object Detection with ImageAI in Python

Introduction

Object detection is a technology that falls under the broader domain of Computer Vision. It deals with identifying and tracking objects present in images and videos. Object detection has multiple applications such as face detection, vehicle detection, pedestrian counting, self-driving cars, security systems, etc. The two major objectives of

Python for NLP: Working with Facebook FastText Library

Python for NLP: Working with Facebook FastText Library This is the 20th article in my series of articles on Python for NLP. In the last few articles, we have been exploring deep learning techniques to perform a variety of machine learning tasks, and you should also be familiar with the concept of word embeddings. Word embeddings is a

Java Flow Control: while and do-while Statements

Java Flow Control: while and do-while Statements

Introduction

Conditional statements and loops are a very important tool in programming. There aren't many things we could do with code that can only execute line-by-line. That's what "flow control" means - guiding the execution of our program, instead of letting it execute line-by-line regardless of any internal

Java Flow Control: The switch Statement

Java Flow Control: The switch Statement

Introduction

Conditional statements and loops are a very important tool in programming. There aren't many things we could do with code that can only execute line-by-line. That's what "flow control" means - guiding the execution of our program, instead of letting it execute line-by-line regardless of any internal

Java Flow Control: if and if-else Statements

Java Flow Control: if and if-else Statements IntroductionConditional statements and loops are a very important tool in programming. There aren't many things we could do with code that can only execute line-by-line unconditionally.That's what "flow control" means - guiding the execution of our program, instead of letting it execute line-by-line regardless of any internal or external...

Introduction to the Python Pyramid Framework

Introduction to the Python Pyramid Framework

Introduction

In this tutorial, we're going to learn how to use the Pyramid framework in Python. It is an open source web development framework which uses the Model-View-Controller (MVC) architecture pattern and is based on Web Server Gateway Interface (WSGI). The Pyramid framework has a lot of useful add-on packages

Python for NLP: Multi-label Text Classification with Keras

Python for NLP: Multi-label Text Classification with Keras

Introduction

This is the 19th article in my series of articles on Python for NLP. From the last few articles, we have been exploring fairly advanced NLP concepts based on deep learning techniques. In the last article, we saw how to create a text classification model trained using multiple inputs

Minimax with Alpha-Beta Pruning in Python

Minimax with Alpha-Beta Pruning in Python

Introduction

Way back in the late 1920s John Von Neumann established the main problem in game theory that has remained relevant still today:
Players s1, s2, ..., sn are playing a given game G. Which moves should player sm play to achieve the best possible outcome?
Shortly

Unit Testing in Java with JUnit 5

Unit Testing in Java with JUnit 5

Introduction

JUnit is a popular testing framework for Java. Simple use is very straightforward and JUnit 5 brought some differences and conveniences compared to JUnit 4. The test code is separate from the actual program code, and in most IDEs the testing results/output are also separate from the program's

Python for NLP: Creating Multi-Data-Type Classification Models with Keras

Python for NLP: Creating Multi-Data-Type Classification Models with Keras This is the 18th article in my series of articles on Python for NLP. In my previous article, I explained how to create a deep learning-based movie sentiment analysis model using Python's Keras library. In that article, we saw how we can perform sentiment analysis of user reviews regarding different

Python String Interpolation with the Percent (%) Operator

Python String Interpolation with the Percent (%) Operator There are a number of different ways to format strings in Python, one of which is done using the % operator, which is known as the string formatting (or interpolation) operator. In this article we'll show you how to use this operator to construct strings with a template string and variables

Topological Sorting in Java

Topological Sorting in Java

Introduction

When getting dressed, as one does, you most likely haven't had this line of thought:
Oh, it might have been a good idea to put on my underpants before getting into my trousers.
That's because we're used to sorting our actions topologically. Or in simpler terms, we're used to

Working with Zip Files in Java

Working with Zip Files in Java Introduction In this article I cover the basics of creating, interacting with, inspecting, and extracting zip archive files using Java (OpenJDK 11 to be specific). The code sample used in this article is in the form of a Gradle project and hosted in this GitHub repo for you to run...

Debugging Python Applications with the PDB Module

Debugging Python Applications with the PDB Module

Introduction

In this tutorial, we are going to learn how to use Python's PDB module for debugging Python applications. Debugging refers to the process of removing software and hardware errors from a software application. PDB stands for "Python Debugger", and is a built-in interactive source code debugger with

Basics of Memory Management in Python

Basics of Memory Management in Python

Introduction

Memory management is the process of efficiently allocating, de-allocating, and coordinating memory so that all the different processes run smoothly and can optimally access different system resources. Memory management also involves cleaning memory of objects that are no longer being accessed. In Python, the memory manager is responsible for

Stripe Integration with Java Spring for Payment Processing

Stripe Integration with Java Spring for Payment Processing

Introduction

It's no lie that "everything is going digital". A lot of products never reach the shelves, but rather get sold online. With the arising number of entrepreneurs, startups, and online sales, a very high percentage of websites nowadays have a payment system, whether it's a subscription to

Spread Operator in JavaScript

Spread Operator in JavaScript

Introduction

In this tutorial, we'll explore one of the powerful features of the ES6 specification of JavaScript - the Spread Operator. Although the syntax is simple, sometimes the implementation is confusing if you do not understand it properly. In this tutorial, we'll demystify those three dots ... of JavaScript that does

Using Django Signals to Simplify and Decouple Code

Using Django Signals to Simplify and Decouple Code

Introduction

Systems are getting more complex as time goes by and this warrants the need to decouple systems more. A decoupled system is easier to build, extend, and maintain in the long run since not only does decoupling reduce the complexity of the system, each part of the system can

Tesseract: Simple Java Optical Character Recognition

Tesseract: Simple Java Optical Character Recognition

Introduction

Developing symbols which have some value is a trait unique to humans. Recognizing these symbols and understanding the letters on an image is absolutely normal for us. We never really grasp letters like computers do, we completely base our ability to read them on our sight. On the other

Python Docstrings

Python Docstrings As already pointed out in a previous article titled Commenting Python Code you have learned that documentation is an essential, and a continuous step in the process of software development. The article mentioned above briefly introduced the concept of docstrings which is a way to create documentation for your Python

Rounding Numbers in Python

Rounding Numbers in Python Using a computer in order to do rather complex Math is one of the reasons this machine was originally developed. As long as integer numbers and additions, subtractions, and multiplications are exclusively involved in the calculations, everything is fine. As soon as floating point numbers or fractions, as well as...

Spring Cloud: Distributed Tracing with Sleuth

Spring Cloud: Distributed Tracing with Sleuth

Overview

In this article, we'll introduce you to Spring Cloud Sleuth, which is a distributed tracing framework for a microservice architecture in the Spring ecosystem. In a typical microservice architecture we have many small applications deployed separately and they often need to communicate with each other. One of the challenges

Image Classification with Transfer Learning and PyTorch

Image Classification with Transfer Learning and PyTorch

Introduction

Transfer learning is a powerful technique for training deep neural networks that allows one to take knowledge learned about one deep learning problem and apply it to a different, yet similar learning problem. Using transfer learning can dramatically speed up the rate of deployment for an app you are

Java String Interview Questions

Java String Interview Questions

Introduction

Without a doubt, the String class is the most used class in Java, representing a sequence of characters, treated as an object. Given the quintessential role of Strings in virtually all Java applications, recruiters give a lot of attention to String-related questions during a job interview. When

Spring Annotations: Testing

Spring Annotations: Testing

Introduction

The Spring Framework is a very robust framework, released in 2002. Its core features can be applied to plain Java applications or extended to complex, modern web applications. As it's constantly being updated and is following new architectural and programming paradigms, it offers support for many other frameworks that

Java Iterable Interface: Iterator, ListIterator, and Spliterator

Java Iterable Interface: Iterator, ListIterator, and Spliterator

Introduction

While we can use a for or while loop to traverse through a collection of elements, an Iterator allows us to do so without worrying about index positions and even allows us to not only go through a collection, but also alter it at the same time, which isn't

Best JavaScript Books for All Skill Levels

Best JavaScript Books for All Skill Levels

Introduction

JavaScript is one of the most widely used programming languages. The power of Single Page Applications gave birth to various JavaScript-based frontend frameworks/libraries like JQuery, Angular, React, etc. With the debut of Node, its popularity has reached new heights. According to the StackOverFlow developers survey 2019, JavaScript is

Python for NLP: Movie Sentiment Analysis using Deep Learning in Keras

Python for NLP: Movie Sentiment Analysis using Deep Learning in Keras This is the 17th article in my series of articles on Python for NLP. In the last article, we started our discussion about deep learning for natural language processing. The previous article was focused primarily towards word embeddings, where we saw how the word embeddings can be used to convert

Serverless Python Application Development with AWS Chalice

Serverless Python Application Development with AWS Chalice Introduction In software development, we are constantly building solutions for end-users that solve a particular problem or ease/automate a certain process. Therefore, designing and building the software is not the only part of the process, as we have to make the software available to the intended users. For web-based...

Creating Python GUI Applications with wxPython

Creating Python GUI Applications with wxPython

Introduction

In this tutorial, we're going to learn how to use wxPython library for developing Graphical User Interfaces (GUI) for desktop applications in Python. GUI is the part of your application which allows the user to interact with your application without having to type in commands, they can do pretty

Spring Annotations: Spring Cloud

Spring Annotations: Spring Cloud

Introduction

The Spring Framework is a very robust framework, released in 2002. Its core features can be applied to plain Java applications or extended to complex, modern web applications. As it's constantly being updated and is following new architectural and programming paradigms, it offers support for many other frameworks that

Introduction to Bash

Introduction to Bash

Introduction

The most common interactions with a computer nowadays are done through a Graphical User Interface (GUI). Before GUIs existed, users would interact with a computer via shell programs, a Command Line Interface (CLI) to run other programs. Despite the ubiquity of GUIs, interacting with a computer via a CLI

Traveling Salesman Problem with Genetic Algorithms in Java

Traveling Salesman Problem with Genetic Algorithms in Java

Introduction

Genetic algorithms are a part of a family of algorithms for global optimization called Evolutionary Computation, which is comprised of artificial intelligence metaheuristics with randomization inspired by biology. In the previous article, Introduction to Genetic Algorithms in Java, we've covered the terminology and theory behind all of the things

Python for NLP: Word Embeddings for Deep Learning in Keras

Python for NLP: Word Embeddings for Deep Learning in Keras This is the 16th article in my series of articles on Python for NLP. In my previous article I explained how N-Grams technique can be used to develop a simple automatic text filler in Python. N-Gram model is basically a way to convert text data into numeric form so that

Introduction to Genetic Algorithms in Java

Introduction to Genetic Algorithms in Java

Introduction

Genetic algorithms are a part of a family of algorithms for global optimization called Evolutionary Computation, which is comprised of artificial intelligence metaheuristics with randomization inspired by biology. Wow, words can really be arranged in any order! But hang in there, we'll break this down:

Python List Sorting with sorted() and sort()

Python List Sorting with sorted() and sort() In this article, we'll examine multiple ways to sort lists in Python. Python ships with two built-in methods for sorting lists and other iterable objects. The method chosen for a particular use-case often depends on whether we want to sort a list in-place or return a new version of the

Spring Annotations: Core Framework Annotations

Spring Annotations: Core Framework Annotations Introduction The Spring Framework is a very robust framework, released in 2002. Its core features can be applied to plain Java applications or extended to complex, modern web applications. As it's constantly being updated and is following new architectural and programming paradigms, it offers support for many other frameworks that...

Gradient Boosting Classifiers in Python with Scikit-Learn

Gradient Boosting Classifiers in Python with Scikit-Learn

Introduction

Gradient boosting classifiers are a group of machine learning algorithms that combine many weak learning models together to create a strong predictive model. Decision trees are usually used when doing gradient boosting. Gradient boosting models are becoming popular because of their effectiveness at classifying complex datasets, and have recently

Python for NLP: Developing an Automatic Text Filler using N-Grams

Python for NLP: Developing an Automatic Text Filler using N-Grams This is the 15th article in my series of articles on Python for NLP. In my previous article, I explained how to implement TF-IDF approach from scratch in Python. Before that we studied, how to implement bag of words approach from scratch in Python. Today, we will study the N-Grams

Arrow Functions in JavaScript

Arrow Functions in JavaScript

Introduction

If you are a JavaScript developer, you may know that JavaScript conforms to the ECMAScript (ES) standards. The ES6, or ECMAScript 2015 specifications, had introduced some of the revolutionary specifications for JavaScript, like Arrow Functions, Classes, Rest and Spread operators, Promises, let and const, etc. In this tutorial, we'll

Implementing Hibernate with Spring Boot and PostgreSQL

Implementing Hibernate with Spring Boot and PostgreSQL

Introduction

As the use of software becomes more common and more and more systems are built to handle various tasks, data plays a more important role in the current and future technology scene. Information is increasingly becoming more valuable as technology advances and opens up more opportunities for its use.

Common String Operations in Java

Common String Operations in Java

Introduction

Simply put, a String is used to store text, i.e. a sequence of characters. Java's most used class is the String class, without a doubt, and with such high usage, it's mandatory for Java developers to be thoroughly acquainted with the class and its common operations.

String

There's

Python's Bokeh Library for Interactive Data Visualization

Python's Bokeh Library for Interactive Data Visualization

Introduction

In this tutorial, we're going to learn how to use Bokeh library in Python. Most of you would have heard of matplotlib, numpy, seaborn, etc. as they are very popular python libraries for graphics and visualizations. What distinguishes Bokeh from these libraries is that it allows dynamic visualization, which

Python for NLP: Creating TF-IDF Model from Scratch

Python for NLP: Creating TF-IDF Model from Scratch This is the 14th article in my series of articles on Python for NLP. In my previous article, I explained how to convert sentences into numeric vectors using the bag of words approach. To get a better understanding of the bag of words approach, we implemented the technique in Python.

Python: Print without Newline

Python: Print without Newline In this article, we'll examine how to print a string without a newline character using Python. In Python, the built-in print function is used to print content to the standard output, which is usually the console. By default, the print function adds a newline character at the end of the...

The Python Assert Statement

The Python Assert Statement In this article, we'll examine how to use the assert statement in Python. In Python, the assert statement is used to validate whether or not a condition is true, using the syntax:
assert <condition>
If the condition evaluates to True, the program continues executing as if nothing out

The Python Help System

The Python Help System When writing and running your Python programs, you may get stuck and need to get help. You may need to know the meaning of certain modules, classes, functions, keywords, etc. The good news is that Python comes with an built-in help system. This means that you don't have to seek

Python for NLP: Creating Bag of Words Model from Scratch

Python for NLP: Creating Bag of Words Model from Scratch This is the 13th article in my series of articles on Python for NLP. In the previous article, we saw how to create a simple rule-based chatbot that uses cosine similarity between the TF-IDF vectors of the words in the corpus and the user input, to generate a response. The

Introduction to GANs with Python and TensorFlow

Introduction to GANs with Python and TensorFlow

Introduction

Generative models are a family of AI architectures whose aim is to create data samples from scratch. They achieve this by capturing the data distributions of the type of things we want to generate. These kind of models are being heavily researched, and there is a huge amount of

Angular Form Validation

Angular Form Validation

Introduction

One of the most common features in any web application is providing a form to users to input some data. You use forms daily to log in, register, place orders, etc. Processing user inputs before validating can have serious consequences. You may end up storing invalid data like an

String vs StringBuilder vs StringBuffer in Java

String vs StringBuilder vs StringBuffer in Java

Introduction

One of the most used classes in Java is the String class. It represents a string (array) of characters, and therefore contains textual data such as "Hello World!". Besides the String class, there are two other classes used for similar purposes, though not nearly as often -

Python for NLP: Creating a Rule-Based Chatbot

Python for NLP: Creating a Rule-Based Chatbot This is the 12th article in my series of articles on Python for NLP. In the previous article, I briefly explained the different functionalities of the Python's Gensim library. Until now, in this series, we have covered almost all of the most commonly used NLP libraries such as NLTK, SpaCy,

Spring Annotations: @RequestMapping and its Variants

Spring Annotations: @RequestMapping and its Variants Introduction If you've read anything about Spring, developed a project, or was even remotely interested in how it works, you've been introduced to the @RequestMapping annotation. It's one of the basic annotations in Spring which maps HTTP requests (URLs) with methods: @RequestMapping("/") public void helloWorld() { return "Hello...

Text Generation with Python and TensorFlow/Keras

Text Generation with Python and TensorFlow/Keras

Introduction

Are you interested in using a neural network to generate text? TensorFlow and Keras can be used for some amazing applications of natural language processing techniques, including the generation of text. In this tutorial, we'll cover the theory behind text generation using a Recurrent Neural Networks, specifically a Long

Phaser 3 and Tiled: Building a Platformer

Phaser 3 and Tiled: Building a Platformer

Introduction

Phaser 3 enables us to quickly create games in our browser with JavaScript. Some of our favorite 2D games are platformers - think of games like Mario, Sonic, Super Meat Boy, or Cuphead. Tiled is a 2D map editor that's used to create game worlds. We'll explore how to

Spring Cloud Stream with RabbitMQ: Message-Driven Microservices

Spring Cloud Stream with RabbitMQ: Message-Driven Microservices

Overview

In this article, we'll introduce you to Spring Cloud Stream, which is a framework for building message-driven microservice applications that are connected by a common messaging brokers like RabbitMQ, Apache Kafka, etc. Spring Cloud Stream is built on top of existing Spring frameworks like Spring Messaging and Spring Integration

How to Use TensorFlow with Java

How to Use TensorFlow with Java

Introduction

Machine Learning is gaining popularity and usage over the globe. It has already drastically changed the way certain applications are built and will likely continue to be a huge (and increasing) part of our daily lives. There's no sugarcoating it, Machine Learning isn't simple. It's pretty daunting and can

Git: Add All Files to a Repo

Git: Add All Files to a Repo When you want Git to track a file in a repository, you must explicitly add it to the repo, which can become a bit cumbersome if you have many files. Another option would be to add/stage all files to the repo, which is much quicker. In general it is

Synchronized Keyword in Java

Synchronized Keyword in Java

Introduction

This is the second article in the series of articles on Concurrency in Java. In the previous article, we learnt about the Executor pool and various categories of Executors in Java. In this article, we will learn what the synchronized keyword is and how we can use that in

Git: Add New Remote to a Repo

Git: Add New Remote to a Repo In the Git version control system you're able to push and pull code from any number of remote repositories. This is beneficial for when you want to pull in updates from someone else's fork of a project, for example. Or you may just want to have a way to link

Web Browser Automation with Selenium and Java

Web Browser Automation with Selenium and Java Introduction Several tools can drive the web browser the way a real user would do like navigating to different pages, interacting with the elements of the page and capturing some data. This process is called Web Browser Automation. What you can do with web browser automation is totally on your...

Introduction to OpenCV with Python

Introduction to OpenCV with Python

Introduction

In this tutorial, we are going to learn how to use OpenCV library in Python. OpenCV is an open source library which is supported by multiple platforms including Windows, Linux, and MacOS, and is available for use in multiple other languages as well; however, it is most commonly used

Run-Length Encoding

Run-Length Encoding In this article we'll go over how the run-length encoding algorithm works, what it's used for, and how to implement its encode and decode functions in Python. Run-length encoding (RLE) is a very simple form of data compression in which a stream of data is given as the input (i.

Git: Create a New Branch

Git: Create a New Branch In Git, and most other VCS tools, branching is one of the main constructs that really make it useful for software development. These branches are almost like a new copy of your code at the current state, which can then be used to develop new code. For example, whenever you

Building a Todo App with Flask in Python

Building a Todo App with Flask in Python

Introduction

In this tutorial, we are going to build an API, or a web service, for a todo app. The API service will be implemented using a REST-based architecture. Our app will have the following main features:

Multiple Linear Regression with Python

Multiple Linear Regression with Python

Introduction

Linear regression is one of the most commonly used algorithms in machine learning. You'll want to get familiar with linear regression because you'll need to use it if you're trying to measure the relationship between two or more continuous values. A deep dive into the theory and implementation of

Introduction to Phaser 3: Building Breakout

Introduction to Phaser 3: Building Breakout

Introduction

Game development is a unique branch of software development that can be as rewarding as it is complex. When thinking of creating games, we usually think of an application to install and play on our computers or consoles. The HTML5 spec introduced many APIs to enable game development on

Mathematical Proof of Algorithm Correctness and Efficiency

Mathematical Proof of Algorithm Correctness and Efficiency

Introduction

When designing a completely new algorithm, a very thorough analysis of its correctness and efficiency is needed. The last thing you would want is your solution not being adequate for a problem it was designed to solve in the first place. In this article we will be talking about

Concurrency in Python

Concurrency in Python Introduction Computing has evolved over time and more and more ways have come up to make computers run even faster. What if instead of executing a single instruction at a time, we can also execute several instructions at the same time? This would mean a significant increase in the performance...

Getting Started with Python's Wikipedia API

Getting Started with Python's Wikipedia API

Introduction

In this article, we will be using the Wikipedia API to retrieve data from Wikipedia. Data scraping has seen a rapid surge owing to the increasing use of data analytics and machine learning tools. The Internet is the single largest source of information, and therefore it is important to

How to Send Emails with Node.js

How to Send Emails with Node.js

Introduction

Email is one of the most used tools for communication in web applications because it helps you reach your users directly, build your brand, or send general notifications. So, you are thinking about sending emails from your next great Node.js application. You are in the right place! In

Working with PDFs in Python: Inserting, Deleting, and Reordering Pages

Working with PDFs in Python: Inserting, Deleting, and Reordering Pages This article is the third in a series on working with PDFs in Python:

Introduction

This article is part three of a little series on working with PDFs in Python. In the previous articles

Creating and Importing Modules in Python

Creating and Importing Modules in Python

Introduction

In Python, a module is a self-contained file with Python statements and definitions. For example, file.py, can be considered a module named file. This differs from a package in that a package is a collection of modules in directories that give structure and hierarchy to the modules. Modules

Predicting Customer Ad Clicks via Machine Learning

Predicting Customer Ad Clicks via Machine Learning

Introduction

Internet marketing has taken over traditional marketing strategies in the recent past. Companies prefer to advertise their products on websites and social media platforms. However, targeting the right audience is still a challenge in online marketing. Spending millions to display the advertisement to the audience that is not likely

The Python String strip() Function

The Python String strip() Function In this article, we'll examine how to strip characters from both ends of a string in Python. The built-in String type is an essential Python structure, and comes with a built-in set of methods to simplify working with text data. There are many situations in which a programmer may want

The Python zip() Function

The Python zip() Function In this article, we'll examine how to use the built-in Python zip() function. The zip() function is a Python built-in function that allows us to combine corresponding elements from multiple sequences into a single list of tuples. The sequences are the arguments accepted by the zip() function. Any number of

Spring Cloud: Turbine

Spring Cloud: Turbine Overview In this article, we'll introduce you to Spring Cloud Netflix Turbine. It aggregates multiple Hystrix Metrics Streams into one, so that it could be displayed into a single dashboard view. To give a small introduction to Hystrix. In a microservice architecture, we have many small applications that talk to...

Image Recognition in Python with TensorFlow and Keras

Image Recognition in Python with TensorFlow and Keras

Introduction

One of the most common utilizations of TensorFlow and Keras is the recognition/classification of images. If you want to learn how to use Keras to classify or recognize images, this article will teach you how.

Definitions

If you aren't clear on the basic concepts behind image recognition, it

Asynchronous Tasks in Django with Redis and Celery

Asynchronous Tasks in Django with Redis and Celery

Introduction

In this tutorial I will be providing a general understanding of why celery message queue's are valuable along with how to utilize celery in conjunction with Redis in a Django application. To demonstrate implementation specifics I will build a minimalistic image processing application that generates thumbnails of images submitted

How to Send HTTP Requests in Java

How to Send HTTP Requests in Java

Introduction

Hypertext Transfer Protocol (HTTP) is an application-layer protocol, which without exaggeration, is pretty much is the backbone of Internet browsing as we know it. It's used for transferring hypermedia documents between the client and the server and is an essential part of every single web application, including any APIs

Non-Access Modifiers in Java

Non-Access Modifiers in Java

Introduction

Modifiers are keywords that let us fine-tune access to our class and its members, their scope, and behavior in certain situations. For example, we can control which classes/objects can access certain members of our class, whether a class can be inherited or not, whether we can override a

Access Modifiers in Java

Access Modifiers in Java

Introduction

Modifiers are keywords that let us fine-tune access to our class and its members, their scope, and behavior in certain situations. For example, we can control which classes/objects can access certain members of our class, whether a class can be inherited or not, whether we can override a

Git: Merge Branch into Master

Git: Merge Branch into Master One of Git's most powerful features is the ability to easily create and merge branches. Git's distributed nature encourages users to create new branches often and to merge them regularly as a part of the development process. This fundamentally improves the development workflow for most projects by encouraging smaller, more

Python: Check if String Contains Substring

Python: Check if String Contains Substring In this article, we'll examine four ways to use Python to check whether a string contains a substring. Each has their own use-cases and pros/cons, some of which we'll briefly cover here:

1) The in Operator

The easiest way to check if a Python string contains a substring is

HashMap and TreeMap in Java: Differences and Similarities

HashMap and TreeMap in Java: Differences and Similarities The performance of a Java program and the proper use of resources are often depend on a collection a developer chose for storing data. Hence, it is very important to understand the difference between the implementations. That's why questions related to collections are in the top of interviews for Java...

Python: Append Contents to a File

Python: Append Contents to a File In this article, we'll examine how to append content to an existing file using Python. Let's say we have a file called helloworld.txt containing the text "Hello world!" and it is sitting in our current working directory on a Unix file system:
$ cat ./helloworld.txt
Hello world!

Overview of Async IO in Python 3.7

Overview of Async IO in Python 3.7 Python 3's asyncio module provides fundamental tools for implementing asynchronous I/O in Python. It was introduced in Python 3.4, and with each subsequent minor release, the module has evolved significantly. This tutorial contains a general overview of the asynchronous paradigm, and how it's implemented in Python 3.7.

Brief Introduction to OpenGL in Python with PyOpenGL

Brief Introduction to OpenGL in Python with PyOpenGL

Introduction

In this tutorial, we're going to learn how to use PyOpenGL library in Python. OpenGL is a graphics library which is supported by multiple platforms including Windows, Linux, and MacOS, and is available for use in multiple other languages as well; however, the scope of this post will be

Python for NLP: Working with the Gensim Library (Part 2)

Python for NLP: Working with the Gensim Library (Part 2) This is my 11th article in the series of articles on Python for NLP and 2nd article on the Gensim library in this series. In a previous article, I provided a brief introduction to Python's Gensim library. I explained how we can create dictionaries that map words to their corresponding

Building GraphQL APIs with Vue.js and Apollo Client

Building GraphQL APIs with Vue.js and Apollo Client

Introduction

GraphQL is a graph-oriented query language written by Facebook. In contrast to REST APIs, GraphQL introduces features that make API development more efficient and in tune with database models.

GraphQL Features

Managing Environment Variables in Node.js with dotenv

Managing Environment Variables in Node.js with dotenv

Introduction

Deploying an application requires developers to put thought and consideration into how it is configured. Many apps are deployed in a development environment before being deployed to the production environment. We need to ensure each environment is configured correctly, it could be disastrous if our production application was using

Working with PDFs in Python: Adding Images and Watermarks

Working with PDFs in Python: Adding Images and Watermarks This article is the second in a series on working with PDFs in Python:

Introduction

Today, a world without the Portable Document Format (PDF) seems to be unthinkable. It has become one of the

Spring Security: Forgot Password Functionality

Spring Security: Forgot Password Functionality Introduction The internet is becoming more and more service oriented with more businesses and companies coming up with offerings that can be provided or accessed online. This requires users to create many accounts on many different platforms for the services that they get online. Such services range from online shopping...

Introduction to Reinforcement Learning with Python

Introduction to Reinforcement Learning with Python

Introduction

Reinforcement Learning is definitely one of the most active and stimulating areas of research in AI. The interest in this field grew exponentially over the last couple of years, following great (and greatly publicized) advances, such as DeepMind's AlphaGo beating the word champion of GO, and OpenAI AI models

Python for NLP: Working with the Gensim Library (Part 1)

Python for NLP: Working with the Gensim Library (Part 1) This is the 10th article in my series of articles on Python for NLP. In my previous article, I explained how the StanfordCoreNLP library can be used to perform different NLP tasks. In this article, we will explore the Gensim library, which is another extremely useful NLP library for Python.

Test Driven Development with pytest

Test Driven Development with pytest

Introduction

Good software is tested software. Testing our code can help us catch bugs or unwanted behavior. Test Driven Development (TDD) is a software development practice that requires us to incrementally write tests for features we want to add. It leverages automated testing suites, like pytest - a testing framework

Overview of Classification Methods in Python with Scikit-Learn

Overview of Classification Methods in Python with Scikit-Learn

Introduction

Are you a Python programmer looking to get into machine learning? An excellent place to start your journey is by getting acquainted with Scikit-Learn. Doing some classification with Scikit-Learn is a straightforward and simple way to start applying what you've learned, to make machine learning concepts concrete by implementing

Lambda Expressions in Java

Lambda Expressions in Java

Introduction

Lambda functions have been an addition that came with Java 8, and was the language's first step towards functional programming, following a general trend toward implementing useful features of various compatible paradigms. The motivation for introducing lambda functions was mainly to reduce the cumbersome repetitive code that went into

Spring Cloud: Hystrix

Spring Cloud: Hystrix

Overview

In this article, we'll introduce you to Spring Cloud Netflix Hystrix. It is a fault tolerance library, which implements the Circuit Breaker enterprise pattern - a pattern designed to prevent cascading failures. In a typical microservice architecture we have many small applications running separately. It's quite common that one

Python for NLP: Getting Started with the StanfordCoreNLP Library

Python for NLP: Getting Started with the StanfordCoreNLP Library This is the ninth article in my series of articles on Python for NLP. In the previous article, we saw how Python's Pattern library can be used to perform a variety of NLP tasks ranging from tokenization to POS tagging, and text classification to sentiment analysis. Before that we explored

The Python Math Library

The Python Math Library Introduction The Python Math Library provides us access to some common math functions and constants in Python, which we can use throughout our code for more complex mathematical computations. The library is a built-in Python module, therefore you don't have to do any installation to use it. In this article,...

Constraint Programming with python-constraint

Constraint Programming with python-constraint

Introduction

The first thing we have to understand while dealing with constraint programming is that the way of thinking is very different from our usual way of thinking when we sit down to write code. Constraint programming is an example of the declarative programming paradigm, as opposed to the usual

Analysis of Black Friday Shopping Trends via Machine Learning

Analysis of Black Friday Shopping Trends via Machine Learning

Introduction

Wikipedia defines Black Friday as an informal name for the Friday following Thanksgiving Day in the United States, which is celebrated on the fourth Thursday of November. [Black Friday is] regarded as the beginning of America's Christmas shopping season [...]. In this article, we will try to explore different trends

Dynamic Programming in Java

Dynamic Programming in Java

Introduction

Dynamic Programming is typically used to optimize recursive algorithms, as they tend to scale exponentially. The main idea is to break down complex problems (with many recursive calls) into smaller subproblems and then save them into memory so that we don't have to recalculate them each time we use

Concurrency in Java: The Executor Framework

Concurrency in Java: The Executor Framework

Introduction

With the increase in the number of the cores available in the processors nowadays, coupled with the ever increasing need to achieve more throughput, multi-threading APIs are getting quite popular. Java provides its own multi-threading framework called the Executor Framework.

What is the Executor Framework?

The Executor Framework contains

Python for NLP: Introduction to the Pattern Library

Python for NLP: Introduction to the Pattern Library This is the eighth article in my series of articles on Python for NLP. In my previous article, I explained how Python's TextBlob library can be used to perform a variety of NLP tasks ranging from tokenization to POS tagging, and text classification to sentiment analysis. In this article, we

Deep vs Shallow Copies in Python

Deep vs Shallow Copies in Python

Introduction

In this tutorial, we are going to discuss shallow copies vs deep copies with the help of examples in Python. We will cover the definition of a deep and shallow copy, along with its implementation in the Python language to evaluate the core differences between the two types of

Working with PDFs in Python: Reading and Splitting Pages

Working with PDFs in Python: Reading and Splitting Pages This article is the first in a series on working with PDFs in Python:

The PDF Document Format

Today, the Portable Document Format (PDF) belongs to the most commonly used data formats. In 1990,

Serialize and Deserialize XML in Java with Jackson

Serialize and Deserialize XML in Java with Jackson Introduction In an increasingly connected ecosystem of software systems, communication between them has become even more paramount. In turn, several technologies have been developed to package data being transferred or shared between these many and different systems. The eXtensible Markup Language, popularly known as XML, is one of the ways...

How Docker can Make your Life Easier as a Developer

How Docker can Make your Life Easier as a Developer

What is Docker?

Docker is a technology that allows you to create and run containers for your applications. Containers are isolated environments that run an application and include its dependencies. They are typically minimal, including just what you need to get your app running and nothing else. Containers are not

Clone Arrays in JavaScript

Clone Arrays in JavaScript In one of my previous articles I covered how you can copy objects in JavaScript. Copying an object is a pretty complicated endeavor, given that you would also have to be able to copy every other data type that could be in the object. But what if you're just copying

Follow Redirects in cURL

Follow Redirects in cURL The cURL utility is a command line program often bundled with Unix/Linux distributions and Mac OSX operating systems. It allows you to send just about any type of HTTP request via the command line, which is great for many things, ranging from posting data to a REST API to

How to Copy Objects in JavaScript

How to Copy Objects in JavaScript

Introduction

A very common task in programming, regardless of language, is to copy (or clone) an object by value, as opposed to copying by reference. The difference is that when copying by value, you then have two unrelated objects with the same value or data. Copying by reference means that

Introduction to the Python Calendar Module

Introduction to the Python Calendar Module

Introduction

Python has an built-in module named Calendar that contains useful classes and functions to support a variety of calendar operations. By default, the Calendar module follows the Gregorian calendar, where Monday is the first day (0) of the week and Sunday is the last day of the week (6)

Python for NLP: Introduction to the TextBlob Library

Python for NLP: Introduction to the TextBlob Library

Introduction

This is the seventh article in my series of articles on Python for NLP. In my previous article, I explained how to perform topic modeling using Latent Dirichlet Allocation and Non-Negative Matrix factorization. We used the Scikit-Learn library to perform topic modeling. In this article, we will explore TextBlob

How to fix: "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED" on Mac and Linux

How to fix: "WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED" on Mac and Linux SSH, or Secure Shell, is a very common way to securely access remote machines, typically via the command line. It aims at ensuring that your connection, and therefore all data passed, is free from eavesdropping. Because of this, there are quite a few checks built-in to the popular SSH clients,

Java: Read a File into an ArrayList

Java: Read a File into an ArrayList Introduction There are many ways to go about Reading and Writing Files in Java. We typically have some data in memory, on which we perform operations, and then persist in a file. However, if we want to change that information, we need to put the contents of the file back...

Introduction to the Python lxml Library

Introduction to the Python lxml Library lxml is a Python library which allows for easy handling of XML and HTML files, and can also be used for web scraping. There are a lot of off-the-shelf XML parsers out there, but for better results, developers sometimes prefer to write their own XML and HTML parsers. This is

Python for NLP: Topic Modeling

Python for NLP: Topic Modeling This is the sixth article in my series of articles on Python for NLP. In my previous article, I talked about how to perform sentiment analysis of Twitter data using Python's Scikit-Learn library. In this article, we will study topic modeling, which is another very important application of NLP. We

Securing Spring Boot Web Applications

Securing Spring Boot Web Applications This article applies to sites created with the Spring Boot framework. We will be discussing the following four methods to add additional layers of security to Spring Boot apps:

The try-with-resources Statement in Java

The try-with-resources Statement in Java

Introduction

try-with-resources is one of the several try statements in Java, aimed to relieve developers of the obligation to release resources used in a try block. It was initially introduced in Java 7 and the whole idea behind it was that the developer doesn't need to worry about resource management

Spring Cloud: Routing with Zuul and Gateway

Spring Cloud: Routing with Zuul and Gateway

Overview

In this article, we'll introduce you to routing your applications via Netflix's Zuul and Spring Cloud Gateway. In a typical microservice architecture we have many small applications running on different hosts and ports. The problem in this type of architecture is how clients (Web Applications in browsers, Mobile apps,

Python for NLP: Sentiment Analysis with Scikit-Learn

Python for NLP: Sentiment Analysis with Scikit-Learn This is the fifth article in the series of articles on NLP for Python. In my previous article, I explained how Python's spaCy library can be used to perform parts of speech tagging and named entity recognition. In this article, I will demonstrate how to do sentiment analysis using Twitter

Getting Started with Selenium and Python

Getting Started with Selenium and Python

Introduction

Web Browser Automation is gaining popularity, and many frameworks/tools have arose to offer automation services to developers. Web Browser Automation is often used for testing purposes in development and production environments, though it's also often used for web scraping data from public sources, analysis, and data processing. Really,

Sorting Algorithms in Python

Sorting Algorithms in Python Introduction Sometimes, data we store or retrieve in an application can have little or no order. We may have to rearrange the data to correctly process it or efficiently use it. Over the years, computer scientists have created many sorting algorithms to organize data. In this article we'll have a...

Sorting Algorithms in Java

Sorting Algorithms in Java

Introduction

Sorting data means arranging it in a certain order, often in an array-like data structure. You can use various ordering criteria, common ones being sorting numbers from least to greatest or vice-versa, or sorting strings lexicographically. You can even define your own criteria, and we'll go into practical ways

Working with PostgreSQL in Python

Working with PostgreSQL in Python

Introduction

PostgreSQL is one of the most advanced and widely used relational database management systems. It's extremely popular for many reasons, a few of which include it being open source, its extensibility, and its ability to handle many different types of applications and varying loads. With Python, you can easily

Python for NLP: Parts of Speech Tagging and Named Entity Recognition

Python for NLP: Parts of Speech Tagging and Named Entity Recognition This is the 4th article in my series of articles on Python for NLP. In my previous article, I explained how the spaCy library can be used to perform tasks like vocabulary and phrase matching. In this article, we will study parts of speech tagging and named entity recognition in

Commenting Python Code

Commenting Python Code Programming reflects your way of thinking in order to describe the single steps that you took to solve a problem using a computer. Commenting your code helps explain your thought process, and helps you and others to understand later on the intention of your code. This allows you to more

Spring Boot Profiles for DEV and PROD Environments

Spring Boot Profiles for DEV and PROD Environments This article applies to sites created with the Spring Boot framework, using Apache Maven as the build tool. In order to demonstrate how profiles work, we'll visit an example using Google Analytics and Google Tag Manager for tracking site metrics. I use this method for my website, Initial Commit, which

Basic AI Concepts: A* Search Algorithm

Basic AI Concepts: A* Search Algorithm

Introduction

Artificial intelligence in its core strives to solve problems of enormous combinatorial complexity. Over the years, these problems were boiled down to search problems. A path search problem is a computational problem where you have to find a path from point A to point B. In our case, we'll

Python for NLP: Vocabulary and Phrase Matching with SpaCy

Python for NLP: Vocabulary and Phrase Matching with SpaCy This is the third article in this series of articles on Python for Natural Language Processing. In the previous article, we saw how Python's NLTK and spaCy libraries can be used to perform simple NLP tasks such as tokenization, stemming and lemmatization. We also saw how to perform parts of

Reading a File Line by Line in Node.js

Reading a File Line by Line in Node.js Introduction In Computer Science, a file is a resource used to record data discretely in a computer's storage device. Node.js doesn't override this in any way and works with anything that is considered a file in your filesystem. Reading files and resources have many usages: Statistics, Analytics, and Reports...

Theory of Computation: Finite State Machines

Theory of Computation: Finite State Machines

Introduction

A Finite State Machine is a model of computation, i.e. a conceptual tool to design systems. It processes a sequence of inputs that changes the state of the system. When all the input is processed, we observe the system's final state to determine whether the input sequence was

Entering the Linux Universe as a Newbie

Entering the Linux Universe as a Newbie By Zoleka and Frank Hofmann The world of technology is a fascinating one. For an end user who has always used Microsoft Windows or Mac OS X, we thought it would be very easy and we would nail it when it came to learning other operating systems such as Linux

Test-Driven Development for Spring Boot APIs

Test-Driven Development for Spring Boot APIs

Introduction

With the rise in adoption of smartphones in the world currently, there has been an influx of mobile applications to achieve a wide variety of tasks. Some of the applications we use on a daily basis communicate with other systems to give us a seamless experience across multiple devices

Introduction to Python FTP

Introduction to Python FTP

Introduction

In this tutorial, we will explore how to use FTP with Python to send and receive files from a server over TCP/IP connections. To make things easier and more abstract, we will be using Python's ftplib library which provides a range of functionalities that make it easier to

Python for NLP: Tokenization, Stemming, and Lemmatization with SpaCy Library

Python for NLP: Tokenization, Stemming, and Lemmatization with SpaCy Library In the previous article, we started our discussion about how to do natural language processing with Python. We saw how to read and write text and PDF files. In this article, we will start working with the spaCy library to perform a few more basic NLP tasks such as tokenization

Spring Cloud: Service Discovery with Eureka

Spring Cloud: Service Discovery with Eureka

Overview

In this article, we'll get introduced to client-side service discovery and load balancing via Spring Cloud Netflix Eureka. In a typical microservice architecture we have many small applications deployed separately and they often need to communicate with each other. Specifically, when we say client service, we mean a service

JavaScript Convert String to Number

JavaScript Convert String to Number

Introduction

Managing data is one of the fundamental concepts of programming. Converting a Number to a String is a common and simple operation. The same goes for the other way around, converting a String to a number.

Converting String to Number

As with the previous shown methods, JavaScript also provides

JavaScript Convert Number to String

JavaScript Convert Number to String Introduction Managing data is one of the fundamental concepts of programming. Because of this, JavaScript offers plenty of tools to parse various data types, allowing you to easily interchange the format of data. Particularly, I'll be covering how to convert a Number to a String in this article. In another...

Git: Squash Multiple Commits in to One Commit

Git: Squash Multiple Commits in to One Commit One of the nice things about Git is it's flexibility, allowing you to perform just about any task on a source tree that you'd need. In this case I'm referring to cleaning up the history of a source tree by squashing commits. When you squash commits, you're combining 2 or

Search Algorithms in Java

Search Algorithms in Java

Introduction

Searching is one of the most common actions performed in regular business applications. This involves fetching some data stored in data structures like Arrays, List, Map, etc. More often than not, this search operation determines the responsiveness of the application for the end-user. In this article, let's take a

Python for NLP: Working with Text and PDF Files

Python for NLP: Working with Text and PDF Files This is the first article in my series of articles on Python for Natural Language Processing (NLP). In this article, we will start with the basics of Python for NLP. We will see how we can work with simple text files and PDF files using Python.

Working with Text Files

Introduction to Python OS Module

Introduction to Python OS Module In this tutorial, you will learn how to work along with Python's os module.

Table of Contents

  1. Introduction
  2. Basic Functions
  3. List Files / Folders in Current Working Directory
  4. Change working Directory
  5. Create Single and Nested Directory Structure
  6. Remove Single and Nested Directory Structure Recursively
  7. Example with Data Processing
  8. Conclusion

Introduction

Python

Introduction to Python Decorators

Introduction to Python Decorators

Introduction

In Python, a decorator is a design pattern that we can use to add new functionality to an already existing object without the need to modify its structure. A decorator should be called directly before the function that is to be extended. With decorators, you can modify the functionality

Affine Image Transformations in Python with Numpy, Pillow and OpenCV

Affine Image Transformations in Python with Numpy, Pillow and OpenCV In this article I will be describing what it means to apply an affine transformation to an image and how to do it in Python. First I will demonstrate the low level operations in Numpy to give a detailed geometric implementation. Then I will segue those into a more practical

Git: Push Tags to a Remote Repo

Git: Push Tags to a Remote Repo If you've been using Git for any significant amount of time then you probably already know how to push your commits from a local branch to a remote repository. But, as you may be aware, Git doesn't just track commits, there are other objects/references as well, like tags. These

For-each Over an Array in JavaScript

For-each Over an Array in JavaScript If you've been writing JavaScript for even a short amount of time, you're probably still aware of how quickly the language is changing. Given all of these changes, that means there are also multiple ways to perform the same function. In this case I'm referring to looping over arrays using...

Doubly Linked List with Python Examples

Doubly Linked List with Python Examples This is the third article in the series of articles on implementing linked list with Python. In Part 1 and Part 2 of the series we studied single linked list in detail. In this article, we will start our discussion about doubly linked list, which is actually an extension of

Git: Change Remote Repo URL

Git: Change Remote Repo URL While I had initially thought that it's very rare for a remote repository to change location, it actually happens a lot more than I realized. A remote repo may change from one private server to another (like a NAS), from a personal GitHub repo to one in an organization, or

Introduction to the Python Pathlib Module

Introduction to the Python Pathlib Module The Pathlib module in Python simplifies the way in working with files and folders. The Pathlib module is available from Python 3.4 and higher versions. It combines the best of Python's file system modules namely os, os.path, glob, etc. In Python, most of the scripts involve interacting with

Remove Element from an Array in JavaScript

Remove Element from an Array in JavaScript In JavaScript, and just like many other languages out there, at some point you'll likely need to remove an element from an array. Depending on your use-case this could be as easy as using the built-in shift() or pop() commands, but that only works if the element is at the

Understanding ROC Curves with Python

Understanding ROC Curves with Python In the current age where Data Science / AI is booming, it is important to understand how Machine Learning is used in the industry to solve complex business problems. In order to select which Machine Learning model should be used in production, a selection metric is chosen upon which different machine

Git: Checkout a Remote Branch

Git: Checkout a Remote Branch In order to checkout a branch from a remote repository, you will have to perform two steps. First, you need to fetch the actual branch data, which includes the commits, files, references, etc. Second, you'll want to actually check it out so your working directory contains the branch files. This

Git: Revert a Merge

Git: Revert a Merge If you merge a branch in to another, and for whatever reason decide you want to undo the merge, there are some ways to do this with Git. The solution to this is simpler if you haven't yet pushed the changes to a remote repo, and if you have then

Sorting and Merging Single Linked List

Sorting and Merging Single Linked List In the last article, we started our discussion about the linked list. We saw what the linked list is along with its advantages and disadvantages. We also studied some of the most commonly used linked list method such as traversal, insertion, deletion, searching, and counting an element. Finally, we saw...

Converting Python Scripts to Executable Files

Converting Python Scripts to Executable Files

Introduction

In this tutorial, we will explore the conversion of Python scripts to Windows executable files in four simple steps. Although there are many ways to do it, we'll be covering, according to popular opinion, the simplest one so far. This tutorial has been designed after reviewing many common errors

Python Performance Optimization

Python Performance Optimization

Introduction

Resources are never sufficient to meet growing needs in most industries, and now especially in technology as it carves its way deeper into our lives. Technology makes life easier and more convenient and it is able to evolve and become better over time. This increased reliance on technology has

Reading and Writing CSVs in Java with OpenCSV

Reading and Writing CSVs in Java with OpenCSV

Introduction

This is the final article in a short series dedicated to Libraries for Reading and Writing CSVs in Java, and a direct continuation from the previous article - Reading and Writing CSVs in Java with Apache Commons CSV.

OpenCSV

OpenCSV is one of the simplest and easiest CSV parsers

Reading and Writing CSVs in Java with Apache Commons CSV

Reading and Writing CSVs in Java with Apache Commons CSV

Introduction

This is the second article in a short series dedicated to Libraries for Reading and Writing CSVs in Java, and a direct continuation from the previous article - Reading and Writing CSVs in Core Java.

Apache Commons CSV

The Apache Commons CSV library is the Apache Software Foundation's version

Git: Fetch a Remote Branch

Git: Fetch a Remote Branch When collaborating with colleagues, or even when you're just using an open source library, you'll often need to fetch a branch from a remote repository using Git. The "base case" to fetch a branch is fairly simple, but like with many other Git operations, it can become quite

Libraries for Reading and Writing CSVs in Java

Libraries for Reading and Writing CSVs in Java

Introduction

CSV stands for Comma Separated Values, a method of formatting data which has been used even before the use of personal computers became widespread. The format gained popularity because the first computers used punched cards to process data, and comma separated values are easier to 'punch' in than traditional

Reading and Writing CSVs in Java

Reading and Writing CSVs in Java

Introduction

This is the first article in a short series dedicated to Libraries for Reading and Writing CSVs in Java.

Reading and Writing CSVs in Core Java

Owning to the popularity and widespread use of CSV as a format for data transfer, there are many parser libraries that can be

Git: Push Local Branch and Track It

Git: Push Local Branch and Track It Whether you've been programming for decades or just started out, at some point in your career you'll need to share your changes to a codebase. Or maybe if you're like me, you might just be paranoid and want to store everything in a remote repository, like GitHub, for safe-keeping in...

Git: Difference Between 'git fetch' and 'git pull'

Git: Difference Between 'git fetch' and 'git pull' As a beginner programmer, or even for many experienced programmers, Git version control can be difficult to learn and master. Much of the reason, in my opinion, is due to the many different commands that exist and the small differences between them. One such example is the difference between git

Design Patterns in Java

Design Patterns in Java

What are Design Patterns?

Design Patterns are simply sets of standardized practices used in the software development industry. They represent solutions, provided by the community, to common problems faced in every-day tasks regarding software development. There's a myriad of design patterns, and you're probably familiar with some of them already.

Git: Rename a Local and Remote Branch

Git: Rename a Local and Remote Branch Did you make a mistake in naming your Git branch? Or maybe "branch-2" wasn't descriptive enough? Luckily in Git you can rename a local branch pretty easily. And while it is also possible with remote branches, the process is a bit more involved with the use of a

Spring Boot: Configuring Properties

Spring Boot: Configuring Properties

Introduction

In this article, we'll be diving into Configuring Spring Boot Properties. Spring allows developers to configure a vast amount of properties for their projects. Spring Boot, besides allowing developers to start off with a project from scratch a lot more easily and time friendly than Spring, also makes it

Git: Revert to a Previous Commit

Git: Revert to a Previous Commit If I've learned anything in my 15+ years of programming, it's that mistakes are common, and I make a lot of them. This equally applies to version control tools as well. Whether you accidentally commit changes, or just realized your previous committed code isn't what you wanted, often times you'll

Git: Delete Branch Locally and Remotely

Git: Delete Branch Locally and Remotely While it's very common to need to create and delete branches in Git, unfortunately the syntax isn't very easy to remember for everyone. Even as a long-time user of Git I need to look up the syntax as a reminder, which admittedly is actually the main motivation behind writing this

Python Programming in Interactive vs Script Mode

Python Programming in Interactive vs Script Mode In Python, there are two options/methods for running code: In this article, we will see the difference between the modes and will also discuss the pros and cons of running scripts in both of these modes.

Interactive Mode

Interactive mode, also known as the REPL

Sending AJAX Requests in Vue.js

Sending AJAX Requests in Vue.js What is AJAX? Asynchronous Javascript and XML (AJAX), is a way of communicating to a web server from a client-side application through the HTTP or HTTPS protocol. Even though AJAX holds XML in the name, the way data is sent through requests or received doesn't have to be XML, but...

PyTesseract: Simple Python Optical Character Recognition

PyTesseract: Simple Python Optical Character Recognition

Introduction

Humans can understand the contents of an image simply by looking. We perceive the text on the image as text and can read it. Computers don't work the same way. They need something more concrete, organized in a way they can understand. This is where Optical Character Recognition (OCR)

Relative vs Absolute Imports in Python

Relative vs Absolute Imports in Python While you can put simple projects in a single file, most Python development projects will require multiple files to keep them manageable. That means you need a way to import one file into another. However, many Pythonistas find importing files confusing. Fortunately, it is easy if you know the difference

Functional Programming in Python

Functional Programming in Python

Introduction

Functional Programming is a popular programming paradigm closely linked to computer science's mathematical foundations. While there is no strict definition of what constitutes a functional language, we consider them to be languages that use functions to transform data. Python is not a functional programming language but it does incorporate

Linked Lists in Detail with Python Examples: Single Linked Lists

Linked Lists in Detail with Python Examples: Single Linked Lists Linked lists are one of the most commonly used data structures in any programming language. In this article, we will study linked lists in detail. We will see what are the different types of linked lists, how to traverse a linked list, how to insert and remove elements from a

An Introduction to Apache Spark with Java

An Introduction to Apache Spark with Java

What is Apache Spark?

Apache Spark is an in-memory distributed data processing engine that is used for processing and analytics of large data-sets. Spark presents a simple interface for the user to perform distributed computing on the entire clusters. Spark does not have its own file systems, so it has

Running SQL on CSV Data: Data Conversion and Extraction

Running SQL on CSV Data: Data Conversion and Extraction A lot of tools output data as comma-separated values (CSV). It is a simple but common tabular data format of plaintext that can easily be processed. Each line of the file represents a single record. A record consists of the same number of fields, or columns. Usually, the delimiter between

Understanding Recursive Functions with Python

Understanding Recursive Functions with Python

Introduction

When we think about repeating a task, we usually think about the for and while loops. These constructs allow us to perform iteration over a list, collection, etc. However, there's another form of repeating a task, in a slightly different manner. By calling a function within itself, to solve

Spring Data: MongoDB Tutorial

Spring Data: MongoDB Tutorial Overview Spring Data is an umbrella project which contains many submodules, each specific to a particular database. In this article, we'll be covering Spring Data MongoDB by building an application that stores and retrieves data from MongoDB, a document based NO-SQL database. If you'd like to read more about Spring...

Automating Version Control Commits

Automating Version Control Commits In the previous article I explained how to monitor your data and how to detect changes using tools like Integrit, which is a Host-based Intrusion Detection System (HIDS). Discovering the changes in files is already quite nice, but keeping track of the content and its changes over time is much

Stacks and Queues in Python

Stacks and Queues in Python

Introduction

Data structures organize storage in computers so that we can efficiently access and change data. Stacks and Queues are some of the earliest data structures defined in computer science. Simple to learn and easy to implement, their uses are common and you'll most likely find yourself incorporating them in

The Best Data Science Libraries in Python

The Best Data Science Libraries in Python

Preface

Due to its exceptional abilities, Python is the most commonly used programming language in the field of Data Science these days. While Python provides a lot of functionality, the availability of various multi-purpose, ready-to-use libraries is what makes the language top choice for Data Scientists. Some of these libraries

Web Scraping the Java Way

Web Scraping the Java Way

Introduction

By definition, web scraping refers to the process of extracting a significant amount of information from a website using scripts or programs. Such scripts or programs allow one to extract data from a website, store it and present it as designed by the creator. The data collected can also

Big O Notation and Algorithm Analysis with Python Examples

Big O Notation and Algorithm Analysis with Python Examples There are multiple ways to solve a problem using a computer program. For instance, there are several ways to sort items in an array. You can use merge sort, bubble sort, insertion sort, etc. All these algorithms have their own pros and cons. An algorithm can be thought of a

Lambda Functions in Python

Lambda Functions in Python

What are Lambda Functions?

In Python, we use the lambda keyword to declare an anonymous function, which is why we refer to them as "lambda functions". An anonymous function refers to a function declared with no name. Although syntactically they look different, lambda functions behave in the same

Getting Started with MySQL and Python

Getting Started with MySQL and Python

Introduction

For any fully functional deployable application, the persistence of data is indispensable. A trivial way of storing data would be to write it to a file in the hard disk, but one would prefer writing the application specific data to a database for obvious reasons. Python provides language support

Vue-Router: Navigating Vue.js Apps

Vue-Router: Navigating Vue.js Apps Introduction Vue-Router is a JavaScript package which allows you to set up routing for Single Page Applications (SPA). SPA refers to a web application which only serves a single index.html page and renders content dynamically, being this the way modern JavaScript frameworks such as React.js or Vue.js...

Monitoring Data Changes Using a HIDS

Monitoring Data Changes Using a HIDS In this article I'll explain how to monitor your data and how to detect changes. This kind of monitoring is mostly done using a Host-based Intrusion Detection System (HIDS) like Integrit. In this article, we describe various methods for your different use-cases.

IDS (Overview)

In general, an Intrusion Detection System

Dockerizing Python Applications

Dockerizing Python Applications

Introduction

Docker is a widely accepted and used tool by leading IT companies to build, manage and secure their applications. Containers, like Docker, allow developers to isolate and run multiple applications on a single operating system, rather than dedicating a Virtual Machine for each application on the server. The use

Spring Security: Email Verification Registration

Spring Security: Email Verification Registration

Overview

The first action a customer takes after visiting a website is creating an account, usually to place an order, book an appointment, pay for a service, etc. When creating an account it is important to persist the correct email address in the system and verify the user's ownership. A

Spring Custom Password Validation

Spring Custom Password Validation

Introduction

These days, password policies are very common and exist on most platforms online. While certain users don't really like them, there's a reason why they exist ¨C making passwords safer. You've most certainly had experience with applications forcing certain rules for your password like the minimum or maximum number of

Introduction to Python Iterators

Introduction to Python Iterators

What are Iterators?

An iterator in Python refers to an object that we can iterate upon. The iterator consists of countable values, and it is possible to traverse through these values, one by one. The iterator simply implements the Python's iterator protocol. The iterator protocol is a Python class which

Python Context Managers

Python Context Managers

Introduction

One of the most "obscure" features of Python that almost all Python programmers use, even the beginner ones, but don't really understand, is context managers. You've probably seen them in the form of with statements, usually first encountered when you learn opening files in Python. Although context

Introduction to Python's Collections Module

Introduction to Python's Collections Module

Introduction

Collections in Python are containers that are used to store collections of data, for example, list, dict, set, tuple etc. These are built-in collections. Several modules have been developed that provide additional data structures to store collections of data. One such module is the Python collections module. Python collections

Automating AWS EC2 Management with Python and Boto3

Automating AWS EC2 Management with Python and Boto3 Introduction In this article I will be demonstrating the use of Python along with the Boto3 Amazon Web Services (AWS) Software Development Kit (SDK) which allows folks knowledgeable in Python programming to utilize the intricate AWS REST API's to manage their cloud resources. Due to the vastness of the AWS...

Course Review: Hands On Computer Vision with OpenCV & Python

Course Review: Hands On Computer Vision with OpenCV & Python

Introduction

In this article I will be providing a review of the Udemy course Hands On Computer Vision with OpenCV & Python by Shrobon Biswas featured on the Udemy online learning site. At the time of this writing I would say that the course is moderately successful with a total

Reading and Writing CSV Files with Node.js

Reading and Writing CSV Files with Node.js

Introduction

The term CSV is an abbreviation that stands for comma-separated values. A CSV file is a plain text file that contains data formatted according to the CSV standard. It has distinct lines which represent records and each field in the record is separated from another by a comma. It's

Linked List Programming Interview Questions

Linked List Programming Interview Questions If you're interested in reading more about Programming Interview Questions in general, we've compiled a lengthy list of these questions, including their explanations, implementations, visual representations and applications.

Introduction

Linked Lists are a data structure that represents a linear collection of nodes. A characteristic specific to linked lists is that

Using Plotly Library for Interactive Data Visualization in Python

Using Plotly Library for Interactive Data Visualization in Python In my previous article, I explained how the Pandas library can be used for plotting basic and time series plots. While Pandas, Matplotlib, and Seaborn libraries are excellent data plotting libraries, they can only plot static graphs. Static plots are like simple non-interactive images. In most of the cases, static

Getting Started with Vue CLI 3.x

Getting Started with Vue CLI 3.x

Introduction

Vue.js is rocketing to unexpected heights after surpassing React.js in GitHub stars, in spite of not being backed by any major company, and the release of their new Command-line Interface (CLI) tool might very well bump them even higher! Scaffolding a Vue project from scratch can be

Intro to the Python Random Module

Intro to the Python Random Module

Introduction

Even for someone not interested in computer programming, the usefulness of generating random numbers in certain circumstances is something obvious. In most board games we throw dice to generate an unpredictable number that defines the player's next move. Also, we can all agree that playing any card game would

Python Nested Functions

Python Nested Functions

What is a Nested Function?

Functions are one of the "first-class citizens" of Python, which means that functions are at the same level as other Python objects like integers, strings, modules, etc. They can be created and destroyed dynamically, passed to other functions, returned as values, etc. Python

Python Logging Basics

Python Logging Basics Introduction Logging helps you keep track of events happening during the execution of your code, which can then be used in the future for debugging purposes. It provides a better picture of the flow of the application and helps developers trace the source of errors that happens during execution of...

Java Collections: The Set Interface

Java Collections: The Set Interface

Introduction

The Java Collections Framework is a fundamental and essential framework that any strong Java developer should know like the back of their hand. A Collection in Java is defined as a group or collection of individual objects that act as a single object. There are many collection classes in

Java Collections: The List Interface

Java Collections: The List Interface

Introduction

The Java Collections Framework is a fundamental and essential framework that any strong Java developer should know like the back of their hand. A Collection in Java is defined as a group or collection of individual objects that act as a single object. There are many collection classes in

Pandas Library for Data Visualization in Python

Pandas Library for Data Visualization in Python In my previous article, I explained how the Seaborn Library can be used for advanced data visualization in Python. Seaborn is an excellent library and I always prefer to work with it, however, it is a bit of an advanced library and needs a bit of time and practice to

Introduction to Web Scraping with Python

Introduction to Web Scraping with Python

Introduction

Web-scraping is an important technique, frequently employed in a lot of different contexts, especially data science and data mining. Python is largely considered the go-to language for web-scraping, the reason being the batteries-included nature of Python. With Python, you can create a simple scraping script in about 15 minutes

Classification in Python with Scikit-Learn and Pandas

Classification in Python with Scikit-Learn and Pandas

Introduction

Classification is a large domain in the field of statistics and machine learning. Generally, classification can be broken down into two areas:
  1. Binary classification, where we wish to group an outcome into one of two groups.
  2. Multi-class classification, where we wish to group an outcome into one of multiple

Java's Object Methods: wait & notify

Java's Object Methods: wait & notify

Introduction

This article is the final tutorial of a series describing the often forgotten about methods of the Java language's base Object class. The following are the methods of the base Java Object which are present in all Java objects due to the implicit inheritance of Object.

Building a GraphQL API with Django

Building a GraphQL API with Django

Introduction

Web APIs are the engines that power most of our applications today. For many years REST has been the dominant architecture for APIs, but in this article we will explore GraphQL. With REST APIs, you generally create URLs for every object of data that's accessible. Let's say we're building

Seaborn Library for Data Visualization in Python: Part 2

Seaborn Library for Data Visualization in Python: Part 2 In the previous article Seaborn Library for Data Visualization in Python: Part 1, we looked at how the Seaborn Library is used to plot distributional and categorial plots. In this article we will continue our discussion and will see some of the other functionalities offered by Seaborn to draw different...

Password Encoding with Spring Security

Password Encoding with Spring Security

Introduction

Password Encoding is the process in which a password is converted from a literal text format into a humanly unreadable sequence of characters. If done correctly, it is very difficult to revert back to the original password and so it helps secure user credentials and prevent unauthorized access to

Sets in Python

Sets in Python

Introduction

In Python, a set is a data structure that stores unordered items. The set items are

Project Lombok: Reducing Java Boilerplate Code

Project Lombok: Reducing Java Boilerplate Code

Overview

Lombok is an open-source library that is used to reduce boilerplate code in Java classes. This is achieved by replacing many of the repetitive pieces of code with simple and concise annotations. Lombok injects itself in the build process (via your project/IDE) and autogenerates the bytecode for the

Seaborn Library for Data Visualization in Python: Part 1

Seaborn Library for Data Visualization in Python: Part 1

Introduction

In the previous article, we looked at how Python's Matplotlib library can be used for data visualization. In this article we will look at Seaborn which is another extremely useful library for data visualization in Python. The Seaborn library is built on top of Matplotlib and offers many advanced

Handling Unix Signals in Python

Handling Unix Signals in Python UNIX/Linux systems offer special mechanisms to communicate between each individual process. One of these mechanisms are signals, and belong to the different methods of communication between processes (Inter Process Communication, abbreviated with IPC). In short, signals are software interrupts that are sent to the program (or the process) to

Python Data Visualization with Matplotlib

Python Data Visualization with Matplotlib

Introduction

Visualizing data trends is one of the most important tasks in data science and machine learning. The choice of data mining and machine learning algorithms depends heavily on the patterns identified in the dataset during data visualization phase. In this article, we will see how we can perform different

Saving Text, JSON, and CSV to a File in Python

Saving Text, JSON, and CSV to a File in Python Saving data to a file is one of the most common programming tasks you may come across in your developer life. Generally, programs take some input and produce some output. There are numerous cases in which we'd want to persist these results. We may find ourselves saving data to a

Search Algorithms in Python

Search Algorithms in Python Introduction Searching for data stored in different data structures is a crucial part of pretty much every single application. There are many different algorithms available to utilize when searching, and each have different implementations and rely on different data structures to get the job done. Being able to choose a...

How to Get Current Date and Time in Java

How to Get Current Date and Time in Java

Introduction

In this article, we'll explore many ways to Get the Current Date and Time in Java. Most applications have the need for timestamping events or showing date/times, among many other use-cases:

Asynchronous vs Synchronous Python Performance Analysis

Asynchronous vs Synchronous Python Performance Analysis

Introduction

This article is the second part of a series on using Python for developing asynchronous web applications. The first part provides a more in-depth coverage of concurrency in Python and asyncio, as well as aiohttp. If you'd like to read more about Asynchronous Python for Web Development, we've got

Exception Handling in Spring

Exception Handling in Spring

Introduction

In this article, we will look into few approaches of exception handling in Spring REST applications. This tutorial assumes that you have a basic knowledge of Spring and can create simple REST APIs using it. If you'd like to read more about exceptions and custom exceptions in Java, we've

Java Convert Integer to String

Java Convert Integer to String

Introduction

Converting a primitive int, or its respective wrapper class Integer, to a String is a common and simple operation. The same goes for the other way around, converting a String to Integer.

Converting Integer to String

When converting an int or Integer to a String, there are four approaches.

Java Convert String to Integer

Java Convert String to Integer

Introduction

Converting a String to an int, or its respective wrapper class Integer, is a common and simple operation. The same goes for the other way around, converting a Integer to String. There are multiple ways to achieve this simple conversion using methods built-in to the JDK.

Converting String to

Lists vs Tuples in Python

Lists vs Tuples in Python

Introduction

Lists and tuples are two of the most commonly used data structures in Python, with dictionary being the third. Lists and tuples have many similarities. Some of them have been enlisted below:

Web Scraping with Node.js

Web Scraping with Node.js

Introduction

By definition, web scraping means getting useful information from web pages. The process should remove the hassle of having to browse pages manually, be automated, and allow to gather and classify the information you're interested in programmatically. Node.js is a great tool to use for web scraping. It

Graph Data Structure Interview Questions

Graph Data Structure Interview Questions Introduction Graph-related interview questions are very common, and many algorithms you'll be expected to know fall into this category. It's important to be acquainted with all of these algorithms - the motivation behind them, their implementations and applications. If you're interested in reading more about Programming Interview Questions in general,...

Programming Interview Questions

Programming Interview Questions

Introduction

If you're a programmer aspiring to work in a top-tier tech company like Google, Microsoft, Apple, or Facebook - you're probably concerned with the interview process. These interviews can be daunting, especially if you're not familiar with the type of questions that you'll be expected to answer. This is

Java's Object Methods: finalize()

Java's Object Methods: finalize()

Introduction

This article is a continuation of a series of articles describing the often forgotten about methods of the Java language's base Object class. The following are the methods of the base Java Object which are present in all Java objects due to the implicit inheritance of Object.

Time Series Analysis with LSTM using Python's Keras Library

Time Series Analysis with LSTM using Python's Keras Library

Introduction

Time series analysis refers to the analysis of change in the trend of the data over a period of time. Time series analysis has a variety of applications. One such application is the prediction of the future value of an item based on its past values. Future stock price

Python GUI Development with Tkinter: Part 3

Python GUI Development with Tkinter: Part 3 This is the third installment of our multi-part series on developing GUIs in Python using Tkinter. Check out the links below for the other parts to this series:

Introduction

Tkinter is

How to Create, Move, and Delete Files in Python

How to Create, Move, and Delete Files in Python

Introduction

Handling files is an entry-level and fundamental skill for any programmer. They're very commonly used to store application data, user configurations, videos, images, etc. There are a countless number of use-cases for files in software applications, so you'd be smart to make yourself deeply familiar with the tasks of

Applying Wrapper Methods in Python for Feature Selection

Applying Wrapper Methods in Python for Feature Selection

Introduction

In the previous article, we studied how we can use filter methods for feature selection for machine learning algorithms. Filter methods are handy when you want to select a generic set of features for all the machine learning models. However, in some scenarios, you may want to use a

How to Make Custom Exceptions in Java

How to Make Custom Exceptions in Java

Overview

In this article, we'll cover the process of creating custom both checked and unchecked exceptions in Java. If you'd like to read more about exceptions and exception handling in Java, we've covered it in detail in - Exception Handling in Java: A Complete Guide with Best and Worst Practices

Asynchronous Python for Web Development

Asynchronous Python for Web Development Asynchronous programming is well suited for tasks that include reading and writing files frequently or sending data back and forth from a server. Asynchronous programs perform I/O operations in a non-blocking fashion, meaning that they can perform other tasks while waiting for data to return from a client rather...

Overloading Functions and Operators in Python

Overloading Functions and Operators in Python

What is Overloading?

Overloading, in the context of programming, refers to the ability of a function or an operator to behave in different ways depending on the parameters that are passed to the function, or the operands that the operator acts on. In this article, we will see how we

Java's Object Methods: clone()

Java's Object Methods: clone()

Introduction

This article is a continuation of a series of articles describing the often forgotten about methods of the Java language's base Object class. The following are the methods of the base Java Object which are present in all Java objects due to the implicit inheritance of Object.

Applying Filter Methods in Python for Feature Selection

Applying Filter Methods in Python for Feature Selection

Introduction

Machine learning and deep learning algorithms learn from data, which consists of different types of features. The training time and performance of a machine learning algorithm depends heavily on the features in the dataset. Ideally, we should only retain those features in the dataset that actually help our machine

Guide to Spring Data JPA

Guide to Spring Data JPA

What is Spring Data JPA?

Spring Data JPA is a part of the Spring Data family.

Python GUI Development with Tkinter: Part 2

Python GUI Development with Tkinter: Part 2 This is the second installment of our multi-part series on developing GUIs in Python using Tkinter. Check out the links below for the other parts to this series:

Introduction

In the

Object Oriented Programming in Python

Object Oriented Programming in Python

Introduction

Object-Oriented Programming (OOP) is a programming paradigm where different components of a computer program are modeled after real-world objects. An object is anything that has some characteristics and

Java REST API Documentation with Swagger2

Java REST API Documentation with Swagger2

Introduction

In this article, we'll dive into the Swagger framework. We'll use Swagger2 to design, build, and document a Spring Boot RESTful API and Swagger UI to observe our endpoints and test them.

What is Swagger?

Swagger is the most widely used tool for building APIs compliant to the OpenAPI

Vim for Python Development

Vim for Python Development What is Vim? Vim is a powerful text editor that belongs to one of the default components on every Linux distribution, as well as Mac OSX. Vim follows its own concept of usage, causing the community to divide into strong supporters and vehement opponents that are in favor for other...

Spring Reactor Tutorial

Spring Reactor Tutorial

Overview

In this article, we'll get introduced to the Spring Reactor project and its importance. The idea is to take advantage of the Reactive Streams Specification to build non-blocking reactive applications on the JVM. Using this knowledge, we'll build a simple reactive application and compare it to a traditional blocking

Getting User Input in Python

Getting User Input in Python

Introduction

The way in which information is obtained and handled is one of the most important aspects in the ethos of any programming language, more so for the information supplied and obtained from the user. Python, while comparatively slow in this regard when compared to other programming languages like C

Python Dictionary Tutorial

Python Dictionary Tutorial

Introduction

Python comes with a variety of built-in data structures, capable of storing different types of data. A Python dictionary is one such data structure that can store data in the form of key-value

Creating a Neural Network from Scratch in Python: Multi-class Classification

Creating a Neural Network from Scratch in Python: Multi-class Classification This is the third article in the series of articles on "Creating a Neural Network From Scratch in Python".

Java's Object Methods: hashCode()

Java's Object Methods: hashCode()

Introduction

This article is a continuation of a series of articles describing the often forgotten about methods of the Java language's base Object class. The following are the methods of the base Java Object which are present in all Java objects due to the implicit inheritance of Object.

A Brief Introduction to matplotlib for Data Visualization

A Brief Introduction to matplotlib for Data Visualization

Introduction

Python has a wide variety of useful packages for machine learning and statistical analysis such as TensorFlow, <a rel="nofollow target="_blank" href="http://www.numpy.org/">NumPy, scikit-learn, Pandas, and more. One package that is essential to most data science projects

Java's Object Methods: equals(Object)

Java's Object Methods: equals(Object)

Introduction

This article is a continuation of a series of articles describing the often forgotten about methods of the Java language's base Object class. The following are the methods of the base Java Object which are present in all Java objects due to the implicit inheritance of Object.

Python GUI Development with Tkinter

Python GUI Development with Tkinter This is the first installment of our multi-part series on developing GUIs in Python using Tkinter. Check out the links below for the next parts to this series: Python GUI Development with Tkinter Python GUI Development with Tkinter: Part 2 Python GUI Development with Tkinter: Part 3 Introduction If you're...

Reading and Writing XML in Java

Reading and Writing XML in Java

What is XML?

The abbreviation "XML" stands for - eXtensible Markup Language. It has a markup structure similar to HTML and was designed to store and transport data. It defines a set of rules that make it both human- and machine-readable. Despite being a

Java's Object Methods: getClass()

Java's Object Methods: getClass()

Introduction

This article is a continuation of a series of articles describing the often forgotten about methods of the Java language's base Object class. Below are the methods of the base Java Object present in all Java objects due to the implicit inheritance of Object along with links to each

Java's Object Methods: toString()

Java's Object Methods: toString()

Introduction

In this article I will be kicking off a series of articles describing the often forgotten about methods of the Java language's base Object class. Below are the methods of the base Java Object, which are present in all Java objects due to the implicit inheritance of Object. Links

Course Review: Tech Explorations Raspberry Pi Full Stack

Course Review: Tech Explorations Raspberry Pi Full Stack

Introduction

This article is a review of the popular Udemy course called Tech Explorations Raspberry Pi Full Stack featuring the Raspberry Pi created by Dr. Peter Dalmaris. The course gives a history of the Raspberry Pi, explains its value and use as a general purpose mini computing device, and even

Introduction to Java 8 Streams

Introduction to Java 8 Streams

Introduction

The main subject of this article is advanced data processing topics using a new functionality added to Java 8 ¨C The Stream API and the Collector API. To get the most out of this article you should already be familiar with the main Java APIs, the Object and String classes,

Dockerizing a Spring Boot Application

Dockerizing a Spring Boot Application

Overview

In this article, we'll cover the process of creating a Docker image of a Spring Boot application, using Dockerfile and Maven and then run the image we've created. The source code for this tutorial can be found on Github. This tutorial assumes that you have Docker installed on your

Installing TensorFlow on Windows

Installing TensorFlow on Windows

Introduction to TensorFlow

TensorFlow is a deep learning framework that provides an easy interface to a variety of functionalities, required to perform state of the art deep learning tasks such as image recognition, text classification and so on. It is a machine learning framework developed by Google and is used

The Best Machine Learning Books for All Skill Levels

The Best Machine Learning Books for All Skill Levels Preface Having recently reviewed the Machine Learning online course Machine Learning A-Z: Hands-On Python & R In Data Science, I decided to shift my focus to a more conventional method of learning i.e. books. In this article I have enlisted the most popular Machine Learning books and classified them...

Creating a Neural Network from Scratch in Python: Adding Hidden Layers

Creating a Neural Network from Scratch in Python: Adding Hidden Layers This is the second article in the series of articles on "Creating a Neural Network From Scratch in Python".

A Brief Look at Web Development in Python

A Brief Look at Web Development in Python

Introduction

Since 2003, Python has ranked in the top 10 programming languages to learn and its ranking has been consistently improving ever since. According to a statistic, Python is one of the top 5 languages to learn in 2019 and has become an essential part of the programming community, thanks

How to Send Emails in Java

How to Send Emails in Java

Overview

Most websites today offer a subscription to a newsletter of any sort to let us know about their great deals, discounts, new products, services, and receipts. When signing up on a website, we also (in most cases) receive an email to verify our email address and link it to

How to Convert a String to Date in Java

How to Convert a String to Date in Java Converting a string to a date in Java (or any programming language) is a fundamental skill and is useful to know when working on projects. Sometimes, it's simply easier to work with a string to represent a date, and then convert it into a Date object for further use. In

Docker: A High Level Introduction

Docker: A High Level Introduction

Introduction

In professional IT circles, especially among data center specialists, Docker has been an extremely important topic for years. Containers have been used for a long time in computer science, and unlike other types of virtualization, containers are running at the top of the operating system kernel. That being said,

Creating a Neural Network from Scratch in Python

Creating a Neural Network from Scratch in Python This is the first article in the series of articles on "Creating a Neural Network From Scratch in Python".

Daily Coding Problem: Programming Puzzles to your Inbox

Daily Coding Problem: Programming Puzzles to your Inbox Like just about any other profession, the key to becoming a great programmer is to practice. Practicing often and consistently is an amazing way, and arguably the best way, to challenge yourself and improve your programming skills. A lot of us have the desire to work in top-tier tech companies,

Reading a File Line by Line in Java

Reading a File Line by Line in Java In Computer Science, a file is a resource used to record data discretely in a computer¡¯s storage device. In Java, a resource is usually an object implementing the AutoCloseable interface. Reading files and resources have many usages: Statistics, Analytics, and Reports Machine Learning Dealing with large text files or...

Introduction to the Python Pickle Module

Introduction to the Python Pickle Module

Introduction

Pickling is a popular method of preserving food. According to Wikipedia, it is also a pretty ancient procedure ¨C although the origins of pickling are unknown, the ancient Mesopotamians probably used the process 4400 years ago. By placing a product in a specific solution, it is possible to drastically increase

Course Review: Master the Python Interview

Course Review: Master the Python Interview

Introduction

This article will be a continuation of the topic of my prior article Preparing for a Python Developer Interview where I gave my opinions and suggestions that I feel will put you in the best position to out perform other developers competing for a Python developer role. In this

NumPy Tutorial: A Simple Example-Based Guide

NumPy Tutorial: A Simple Example-Based Guide

Reading and Writing Files in Java

Reading and Writing Files in Java

Introduction

In this article, we'll be diving into Reading and Writing Files in Java. When programming, whether you're creating a mobile app, a web application, or just writing scripts, you often have the need to read or write data to a file. This data could be cache data, data you

How to Format Dates in Python

How to Format Dates in Python

Introduction

Python comes with a variety of useful objects that can be used out of the box. Date objects are examples of such objects. Date types are difficult to manipulate from scratch, due to the complexity of dates and times. However, Python date objects make it extremely easy to convert

Backing up and Restoring PostgreSQL Databases

Backing up and Restoring PostgreSQL Databases

Introduction

Making regular database backups is an essential maintenance task and fail point recovery strategy for anyone who is responsible for a database. A common misnomer for software developers is that there will be a database administrator who will take care of these things for us. Unfortunately, in my experience

Creating a Simple Recommender System in Python using Pandas

Creating a Simple Recommender System in Python using Pandas

Introduction

Have you ever wondered how Netflix suggests movies to you based on the movies you have already watched? Or how does an e-commerce websites display options such as "Frequently Bought Together"? They may look relatively simple options but behind the scenes, a complex statistical algorithm executes in

Java J2EE Design Patterns

Java J2EE Design Patterns Overview This is the fourth and final article in a short series dedicated to Design Patterns in Java, and a direct continuation from the previous article - Behavioral Design Patterns in Java. J2EE Patterns J2EE Patterns are concerned about providing solutions regarding Java EE. These patterns are widely accepted by...

Exception Handling in Java: A Complete Guide with Best and Worst Practices

Exception Handling in Java: A Complete Guide with Best and Worst Practices

Overview

Handling Exceptions in Java is one of the most basic and fundamental things a developer should know by heart. Sadly, this is often overlooked and the importance of exception handling is underestimated - it's as important as the rest of the code. In this article, let's go through everything

The Best Java Books for All Skill Levels

The Best Java Books for All Skill Levels There are many reasons to learn Java. It's without a doubt the most widespread and widely used programming language today. It's being used in both small and enterprise applications all over the globe and can be used to create just about anything, thanks to the flexibility of the language. According

Implementing Word2Vec with Gensim Library in Python

Implementing Word2Vec with Gensim Library in Python

Introduction

Humans have a natural ability to understand what other people are saying and what to say in response. This ability is developed by consistently interacting with other people and the society over many years. The language plays a very important role in how humans interact. Languages that humans use

Preparing for a Python Developer Interview

Preparing for a Python Developer Interview

Introduction

In this article I will be giving my opinions and suggestions for putting yourself in the best position to out-perform competing candidates in a Python programming interview so that you can land a job as a Python developer. You may be thinking, with the shortage of programmers in the

How to Test a Spring Boot Application

How to Test a Spring Boot Application

Introduction

Please note: The following article will be dedicated to testing Spring Boot applications. It's assumed that you are familiar with at least the basics of Java, Maven and Spring Boot (Controllers, Dependencies, Database Repository, etc). There is a general lack of testing in most organizations. Maybe even your team

Reading and Writing JSON in Java

Reading and Writing JSON in Java

What is JSON?

JavaScript Object Notation or in short JSON is a data-interchange format that was introduced in 1999 and became widely adopted in the mid-2000s. Currently, it is the de-facto standard format for the communication between web services and their clients (browsers, mobile applications, etc.). Knowing how to read

Behavioral Design Patterns in Java

Behavioral Design Patterns in Java

Overview

This is the third article in a short series dedicated to Design Patterns in Java, and a direct continuation from the previous article - Structural Design Patterns in Java.

Behavioral Patterns

Behavioral Patterns are concerned with providing solutions regarding object interaction - how they communicate, how are some dependent

File Handling in Python

File Handling in Python Introduction It is an unwritten consensus that Python is one of the best starting programming languages to learn as a novice. It is extremely versatile, easy to read/analyze, and quite pleasant to the eye. The Python programming language is highly scalable and is widely considered as one of the...

Text Summarization with NLTK in Python

Text Summarization with NLTK in Python

Introduction

As I write this article, 1,907,223,370 websites are active on the internet and 2,722,460 emails are being sent per second. This is an unbelievably huge amount of data. It is impossible for a user to get insights from such huge volumes of data. Furthermore,

Beginner's Tutorial on the Pandas Python Library

Beginner's Tutorial on the Pandas Python Library Pandas is an open source Python package that provides numerous tools for data analysis. The package comes with several data structures that can be used for many different data manipulation tasks. It also has a variety of methods that can be invoked for data analysis, which comes in handy when

Introduction to the ELK Stack

Introduction to the ELK Stack The products we build often rely on multiple web servers and/or multiple database servers. In such cases, we often don¡¯t have centralized tools for analyzing and storing logs. Under such circumstances, identifying different types of events and correlating them with other types of events is an almost impossible

How to Copy a File in Java

How to Copy a File in Java

Copying Files in Java

Copying a file or directory used to be a typical development task. With the introduction of Docker containers and a desire for maximum immutability, we see it less and less often. Still, it's a fundamental concept, and it might be useful to know what options does

Course Review: Machine Learning A-Z - Hands-On Python & R in Data Science

Course Review: Machine Learning A-Z - Hands-On Python & R in Data Science

Preface

Every day, we are experiencing continuous innovation across numerous fields, and the tremendous growth in the field of computing offers various technologies for us to consume. We are generating over 2 exabytes of data every day, which is too difficult to be handled just by human effort. Engineers all

Dropwizard Tutorial: Develop RESTful Web Services Faster

Dropwizard Tutorial: Develop RESTful Web Services Faster

What is Dropwizard?

Dropwizard is an open source Java framework used for the fast development of RESTful web services. Or better, it's a light-weight best-in-class set of tools and frameworks for building RESTful web services. It's pretty easy to use, very maintainable and it has worked extremely well in many

Comparing Strings using Python

Comparing Strings using Python In Python, strings are sequences of characters, which are effectively stored in memory as an object. Each object can be identified using the id() method, as you can see below. Python tries to re-use objects in memory that have the same value, which also makes comparing objects very fast in

Text Classification with Python and Scikit-Learn

Text Classification with Python and Scikit-Learn Introduction Text classification is one of the most important tasks in Natural Language Processing. It is the process of classifying text strings or documents into different categories, depending upon the contents of the strings. Text classification has a variety of applications, such as detecting user sentiment from a tweet, classifying...

Structural Design Patterns in Java

Structural Design Patterns in Java

Overview

This is the second article in a short series dedicated to Design Patterns in Java, and a direct continuation from the previous article - Creational Design Patterns in Java.

Structural Patterns

Structural Patterns are concerned about providing solutions and efficient standards regarding class compositions and object structures. Also, they

Integrating H2 Database with Spring Boot

Integrating H2 Database with Spring Boot

What is Spring Boot

If you are a Spring developer, surely you are familiar with the overhead of repetitive configurations we need to do in order to set up a project. Honestly, it's a painful and tedious activity. Being a developer, our focus should be on business logic and not

Creational Design Patterns in Java

Creational Design Patterns in Java

Overview

This is the first article in a short series dedicated to Design Patterns in Java.

Creational Patterns

The Creational Patterns in Java that are covered in this article are:

Factory Method

The Factory Method, also often called the Factory Pattern is

How to Download a File from a URL in Java

How to Download a File from a URL in Java Are you looking to create your very own dataset for a new and innovative application? Or maybe you're trying to collect data for analysis for a college project and have become weary of manually downloading each image or CSV. Worry not, in this article I'll explain the building blocks needed

How to Access the Facebook API with Java and Spring Boot

How to Access the Facebook API with Java and Spring Boot

Overview

Being able to access APIs from major social media platforms can be used as a powerful and useful tool. Fortunately, it's not hard to do so, especially using Spring Boot, and more precisely, the Spring Social module. Spring Social offers four main projects:

Using Regex for Text Manipulation in Python

Using Regex for Text Manipulation in Python

Introduction

Text preprocessing is one of the most important tasks in Natural Language Processing (NLP). For instance, you may want to remove all punctuation marks from text documents before they can be used for text classification. Similarly, you may want to extract numbers from a text string. Writing manual scripts

Association Rule Mining via Apriori Algorithm in Python

Association Rule Mining via Apriori Algorithm in Python Association rule mining is a technique to identify underlying relations between different items. Take an example of a Super Market where customers can buy variety of items. Usually, there is a pattern in what the customers buy. For instance, mothers with babies buy baby products such as milk and diapers.

Course Review: The Web Developer Bootcamp

Course Review: The Web Developer Bootcamp It would be difficult to be a developer these days and not have at least a limited understanding of the web and it's massive popularity. As many of you probably already know, the Web (or World Wide Web) is the system of web pages and sites that uses the Internet...

The Python Requests Module

The Python Requests Module

Introduction

Dealing with HTTP requests is not an easy task in any programming language. If we talk about Python, it comes with two built-in modules, urllib and urllib2, to handle HTTP related operation. Both modules come with a different set of functionalities and many times they need to be used

Using Sequelize.js and SQLite in an Express.js App

Using Sequelize.js and SQLite in an Express.js App In this tutorial I will be demonstrating how to build a simple contacts management web application using Node.js, Express.js, Vue.js in conjunction with the sequelize.js object relational mapper (ORM) backed by a SQLite database. However, the primary focus of this article will be how to use

Cross Validation and Grid Search for Model Selection in Python

Cross Validation and Grid Search for Model Selection in Python

Introduction

A typical machine learning process involves training different models on the dataset and selecting the one with best performance. However, evaluating the performance of algorithm is not always a straight forward task. There are several factors that can help you determine which algorithm performance best. One such factor is

The Myth of Multi-tasking as a Developer

The Myth of Multi-tasking as a Developer Occasionally, as a member in a team or as a self-employed person you have to keep the stages of various projects in mind. More and more in our work life, the possibility to only concentrate on a single task becomes the exception rather than the rule. This raises the question

Course Review: The Complete Java Masterclass

Course Review: The Complete Java Masterclass

Preface

The word "Java" has become so ubiquitous that even non-technical folks seem to be aware of it these days. Thanks to the tremendous popularity of the programming language, its growth across various domains has been unprecedented. The major reason behind the language's success is in its platform

Hierarchical Clustering with Python and Scikit-Learn

Hierarchical Clustering with Python and Scikit-Learn Hierarchical clustering is a type of unsupervised machine learning algorithm used to cluster unlabeled data points. Like K-means clustering, hierarchical clustering also groups together the data points with similar characteristics. In some cases the result of hierarchical and K-Means clustering can be similar. Before implementing hierarchical clustering using Scikit-Learn, let's

The Naive Bayes Algorithm in Python with Scikit-Learn

The Naive Bayes Algorithm in Python with Scikit-Learn When studying Probability & Statistics, one of the first and most important theorems students learn is the Bayes' Theorem. This theorem is the foundation of deductive reasoning, which focuses on determining the probability of an event occurring based on prior knowledge of conditions that might be related to the event.

Converting Strings to datetime in Python

Converting Strings to datetime in Python Introduction One of the many common problems that we face in software development is handling dates and times. After getting a date-time string from an API, for example, we need to convert it to a human-readable format. Again, if the same API is used in different timezones, the conversion will...

How to use Timers and Events in Node.js

How to use Timers and Events in Node.js

Events and Timers in Node.js

Node.js has multiple utilities for handling events as well as scheduling the execution of code. These utilities, combined, give you the ability to reactively respond at the right time, for example:

The Python tempfile Module

The Python tempfile Module

Introduction

Temporary files, or "tempfiles", are mainly used to store intermediate information on disk for an application. These files are normally created for different purposes such as temporary backup or if the application is dealing with a large dataset bigger than the system's memory, etc. Ideally, these files

Preparing for a Job Interview as a Programmer

Preparing for a Job Interview as a Programmer After many years of studying, the next thing is to get that ultimate job that you have been working so hard for. In order to be well prepared as a developer who is entering the work life, here are a few pointers needed for you to outshine your competitors and

Random Forest Algorithm with Python and Scikit-Learn

Random Forest Algorithm with Python and Scikit-Learn Random forest is a type of supervised machine learning algorithm based on ensemble learning. Ensemble learning is a type of learning where you join different types of algorithms or same algorithm multiple times to form a more powerful prediction model. The random forest algorithm combines multiple algorithm of the same

Course Review: Complete Python Bootcamp - Go from zero to hero in Python 3

Course Review: Complete Python Bootcamp - Go from zero to hero in Python 3

Introduction

The Python programming language has been around for a long time now and given the powerful language that it is, it shouldn't be a surprise for it to continue having a strong foothold for years to come. Python's extensibile frameworks and rich set of libraries make it a top

Course Review: Python for Data Science and Machine Learning Bootcamp

Course Review: Python for Data Science and Machine Learning Bootcamp Before we get started it would be helpful to know what data science and machine learning actually are. So in case you don't know, here are some basic definitions:
Data science is an interdisciplinary field of scientific methods, processes, algorithms and systems to extract knowledge or insights from data in

Introduction to the Python Coding Style

Introduction to the Python Coding Style Python as a scripting language is quite simple and compact. Compared to other languages, you only have a relatively low number of keywords to internalize in order to write proper Python code. Furthermore, both simplicity as well as readability of the code are preferred, which is what Python prides itself

Implementing LDA in Python with Scikit-Learn

Implementing LDA in Python with Scikit-Learn In our previous article Implementing PCA in Python with Scikit-Learn, we studied how we can reduce dimensionality of the feature set using PCA. In this article we will study another very important dimensionality reduction technique: linear discriminant analysis (or LDA). But first let's briefly discuss how PCA and LDA differ...

A SQLite Tutorial with Node.js

A SQLite Tutorial with Node.js In this tutorial I will be demonstrating how to use SQLite in combination with JavaScript inside the Node.js environment with the help of the sqlite3 Node.js driver. For those not familiar with SQLite, it is a simple single file relational database that is very popular among smart devices,

Implementing PCA in Python with Scikit-Learn

Implementing PCA in Python with Scikit-Learn With the availability of high performance CPUs and GPUs, it is pretty much possible to solve every regression, classification, clustering and other related problems using machine learning and deep learning models. However, there are still various factors that cause performance bottlenecks while developing such models. Large number of features in

Course Review: The Complete React Native and Redux Course

Course Review: The Complete React Native and Redux Course Have you wanted to learn React Native for a while and been wondering what online course or tutorial to take? Have you been working with JavaScript, React, or React Native and want a good course to advance your skills? Or, are you just generally looking for a React Native tutorial

Beginner's Guide to ngrx and Angular

Beginner's Guide to ngrx and Angular

Introduction

State management is a term that will always come to mind whenever dealing with an application data structure.
The biggest problem in the development and maintenance of large-scale software systems is complexity - large systems are hard to understand.
Reactive programming is when we react to data being streamed

Local and Global Variables in Python

Local and Global Variables in Python One of the basic elements of programming languages are variables. Simply speaking a variable is an abstraction layer for the memory cells that contain the actual value. For us, as a developer, it is easier to remember the name of the memory cell than it is to remember its physical

Single Page Apps with Vue.js and Flask: Deployment

Single Page Apps with Vue.js and Flask: Deployment

Deployment to a Virtual Private Server

Welcome to the seventh and final installment to this multi-part tutorial series on full-stack web development using Vue.js and Flask. In this post I will be demonstrating how do deploy the application built throughout this series. The code for this post can be

Implementing SVM and Kernel SVM with Python's Scikit-Learn

Implementing SVM and Kernel SVM with Python's Scikit-Learn A support vector machine (SVM) is a type of supervised machine learning classification algorithm. SVMs were introduced initially in 1960s and were later refined in 1990s. However, it is only now that they are becoming extremely popular, owing to their ability to achieve brilliant results. SVMs are implemented in a

Basic Socket Programming in Python

Basic Socket Programming in Python In general, network services follow the traditional client/server model. One computer acts as a server to provide a certain service and another computer represents the client side which makes use of this service. In order to communicate over the network a network socket comes into play, mostly only referred...

Single Page Apps with Vue.js and Flask: JWT Authentication

Single Page Apps with Vue.js and Flask: JWT Authentication

JWT Authentication

Welcome to the sixth installment to this multi-part tutorial series on full-stack web development using Vue.js and Flask. In this post I will be demonstrating a way to use JSON Web Token (JWT) authentication. The code for this post can be found on my GitHub account under

Deploy Node.js Apps on Google App Engine

Deploy Node.js Apps on Google App Engine

Introduction

TL;DR; In this article we are going to deploy a Node.js app on Google App Engine and in the process see how it is done. This is going to be a step-by-step demonstration starting from setting up our Google App Engine environment to deployment. NB: This tutorial

Reading and Writing Lists to a File in Python

Reading and Writing Lists to a File in Python As serialized data structures, Python programmers intensively use arrays, lists, and dictionaries. Storing these data structures persistently requires either a file or a database to work with. This article describes how to write a list to file, and how to read that list back into memory. To write data in

Single Page Apps with Vue.js and Flask: AJAX Integration

Single Page Apps with Vue.js and Flask: AJAX Integration

AJAX Integration with REST API

Thanks for joining me for the fifth post on using Vue.js and Flask for full-stack web development. This post will be fairly short, but highly valuable as I will be demonstrating how to connect the front-end and back-end applications using Asynchronous Javascript and XML

Creating and Deleting Directories with Python

Creating and Deleting Directories with Python This article continues with our series on interacting with the file system in Python. The previous articles dealt with reading and writing files. Interestingly, the file system is much more than a way to store/retrieve data to disk. There are also various other types of entries such as files,

Single Page Apps with Vue.js and Flask: RESTful API with Flask

Single Page Apps with Vue.js and Flask: RESTful API with Flask

RESTful API with Flask

Welcome to the fourth post on using Vue.js and Flask for full-stack web development. The focus of this post will be on building a backend REST API using the Python based Flask web framework. The code for this post is in a repo on my

Writing Files using Python

Writing Files using Python As pointed out in a previous article that deals with reading data from files, file handling belongs to the essential knowledge of every professional Python programmer. This feature is a core part of the Python language, and no extra module needs to be loaded to do it properly.

Basics of

Decision Trees in Python with Scikit-Learn

Decision Trees in Python with Scikit-Learn Introduction A decision tree is one of most frequently and widely used supervised machine learning algorithms that can perform both regression and classification tasks. The intuition behind the decision tree algorithm is simple, yet also very powerful. For each attribute in the dataset, the decision tree algorithm forms a node,...

Reading Files with Python

Reading Files with Python To work with stored data, file handling belongs to the core knowledge of every professional Python programmer. Right from its earliest release, both reading and writing data to files are built-in Python features. In comparison to other programming languages like C or Java it is pretty simple and only requires

Single Page Apps with Vue.js and Flask: State Management with Vuex

Single Page Apps with Vue.js and Flask: State Management with Vuex

State Management with Vuex

Thanks for joining me for the third post on using Vue.js and Flask for full-stack web development. The major topic in this post will be on using vuex to manage state in our app. To introduce vuex I will demonstrate how to refactor the Home

Python Metaclasses and Metaprogramming

Python Metaclasses and Metaprogramming Imagine if you could have computer programs that wrote your code for you. It is possible, but the machines will not write all your code for you! This technique, called metaprogramming, is popular with code framework developers. This is how you get code generation and smart features in many popular

K-Nearest Neighbors Algorithm in Python and Scikit-Learn

K-Nearest Neighbors Algorithm in Python and Scikit-Learn The K-nearest neighbors (KNN) algorithm is a type of supervised machine learning algorithms. KNN is extremely easy to implement in its most basic form, and yet performs quite complex classification tasks. It is a lazy learning algorithm since it doesn't have a specialized training phase. Rather, it uses all of

Single Page Apps with Vue.js and Flask: Navigating Vue Router

Single Page Apps with Vue.js and Flask: Navigating Vue Router

Navigating the Vue Router

Welcome to the second post on using Vue.js and Flask for full-stack web development. The major topic in this article will be on Vue Router, but I will also cover the v-model directive, as well as Vue methods and computed properties. That being said, grab

Phonetic Similarity of Words: A Vectorized Approach in Python

Phonetic Similarity of Words: A Vectorized Approach in Python In an earlier article I gave you an introduction into phonetic algorithms, and shows their variety. In more detail we had a look at the edit distance, which is also known as the Levenshtein Distance. This algorithm was developed in order to calculate the number of letter substitutions to get

Single Page Apps with Vue.js and Flask: Setting up Vue.js

Single Page Apps with Vue.js and Flask: Setting up Vue.js

Setup and Getting to Know Vue.js

Introduction

This is the opening post to a tutorial series on using Vue.js and Flask for full stack web development. In this series I am going to demonstrate how to build a survey web app where the application architecture consists of a

Linear Regression in Python with Scikit-Learn

Linear Regression in Python with Scikit-Learn There are two types of supervised machine learning algorithms: Regression and classification. The former predicts continuous value outputs while the latter predicts discrete outputs. For instance, predicting the price of a house in dollars is a regression problem whereas predicting whether a tumor is malignant or benign is a classification...

The Best Python Books for All Skill Levels

The Best Python Books for All Skill Levels Just about every year is a good year to be investing in Python learning, whether you are a beginner or an expert. Employment opportunities are opening for Python developers in fields beyond traditional web development. An IBM blog post reports that Python is now the dominant language in many data

Introduction to Neural Networks with Scikit-Learn

Introduction to Neural Networks with Scikit-Learn

What is a Neural Network?

Humans have an ability to identify patterns within the accessible information with an astonishingly high degree of accuracy. Whenever you see a car or a bicycle you can immediately recognize what they are. This is because we have learned over a period of time how

Integrating Elasticsearch with MS SQL, Logstash, and Kibana

Integrating Elasticsearch with MS SQL, Logstash, and Kibana

Introduction

MS SQL Server holds the data in relational form or even multi-dimensional form (through SSAS) and proffers several out-of-the-box search features through Full Text Search (FTS). However, the search function of the modern-world applications has many complexities. The search specifications are hybrid and the queries demand full-scale searching over

Enhancing Python with Custom C Extensions

Enhancing Python with Custom C Extensions

Introduction

This article is going to highlight the features of CPython's C API which is used to build C extensions for Python. I will be going over the the general workflow for taking a small library of fairly banal, toy example, C functions and exposing in to a Python wrapper.

Accessing the Twitter API with Python

Accessing the Twitter API with Python

Introduction

One thing that Python developers enjoy is surely the huge number of resources developed by its big community. Python-built application programming interfaces (APIs) are a common thing for web sites. It's hard to imagine that any popular web service will not have created a Python API library to facilitate

How to Start a Node Server: Examples with the Most Popular Frameworks

How to Start a Node Server: Examples with the Most Popular Frameworks

Hello World with a Node.js Server

Did you know that there are multiple ways to start a Node.js server and keep it running? In this post, we will explore various ways to start an HTTP Node server. A Node.js server makes your app available to serve HTTP

Levenshtein Distance and Text Similarity in Python

Levenshtein Distance and Text Similarity in Python

Introduction

Writing text is a creative process that is based on thoughts and ideas which come to our mind. The way that the text is written reflects our personality and is also very much influenced by the mood we are in, the way we organize our thoughts, the topic itself

K-Means Clustering with Scikit-Learn

K-Means Clustering with Scikit-Learn Introduction K-means clustering is one of the most widely used unsupervised machine learning algorithms that forms clusters of data based on the similarity between data instances. For this particular algorithm to work, the number of clusters has to be defined beforehand. The K in the K-means refers to the number...

Scheduling Jobs with python-crontab

Scheduling Jobs with python-crontab

What is Crontab

Cron is a software utility that allows us to schedule tasks on Unix-like systems. The name is derived from the Greek word "Chronos", which means "time". The tasks in Cron are defined in a crontab, which is a text file containing the commands

A SQLite Tutorial with Python

A SQLite Tutorial with Python

Introduction

This tutorial will cover using SQLite in combination with Python's sqlite3 interface. SQLite is a single file relational database bundled with most standard Python installs. SQLite is often the technology of choice for small applications, particularly those of embedded systems and devices like phones and tablets, smart appliances, and

How to get your IP Address on Linux

How to get your IP Address on Linux

Public and Private IP Addresses

IP addresses are an essential part of modern networked communications. In this guide, we will show you how to find your own IP address. These instructions will work for most of the various Linux distributions like Ubuntu, Debian and Linux Mint, among others. BSD systems

What is Natural Language Processing?

What is Natural Language Processing?

Introduction

Natural language refers to the language used by humans to communicate with each other. This communication can be verbal or textual. For instance, face-to-face conversations, tweets, blogs, emails, websites, SMS messages, all contain natural language. Natural language is an incredibly important thing for computers to understand for a few

Python zlib Library Tutorial

Python zlib Library Tutorial

What is Python zlib

The Python zlib library provides a Python interface to the zlib C library, which is a higher-level abstraction for the DEFLATE lossless compression algorithm. The data format used by the library is specified in the RFC 1950 to 1952, which is available at http://www.ietf.

Formatting Strings with Python

Formatting Strings with Python

Introduction

Sooner or later string formatting becomes a necessary evil for most programmers. More so in the past before the thick client GUI era, but the need to have a specific string representation is still a common enough use case. My first introduction was back in college when I had

Hapi vs Express: Comparing Node.js Web Frameworks

Hapi vs Express: Comparing Node.js Web Frameworks Chances are you've heard of Hapi by now. And you might be wondering how it compares to the Express web framework in Node.js development. In this article, we will compare the frameworks head-to-head and explore the differences in experience for the developer.

Similarities and Differences Between Hapi and Express

Using Machine Learning to Predict the Weather: Part 3

Using Machine Learning to Predict the Weather: Part 3 This is the final article on using machine learning in Python to make predictions of the mean temperature based off of meteorological weather data retrieved from Weather Underground as described in part one of this series. The topic of this final article will be to build a neural network regressor...

Understanding Python's "yield" Keyword

Understanding Python's "yield" Keyword The yield keyword in Python is used to create generators. A generator is a type of collection that produces items on-the-fly and can only be iterated once. By using generators you can improve your application's performance and consume less memory as compared to normal collections, so it provides a nice

Reading and Writing XML Files in Python

Reading and Writing XML Files in Python XML, or Extensible Markup Language, is a markup-language that is commonly used to structure, store, and transfer data between systems. While not as common as it used to be, it is still used in services like RSS and SOAP, as well as for structuring files like Microsoft Office documents. With

Loops in Python

Loops in Python

Choosing the Right Loop Construct

Python offers a variety of constructs to do loops. This article presents them and gives advice on their specific usage. Furthermore, we will also have a look at the performance of each looping construct in your Python code. It might be surprising for you.

Loops,

Python Modules: Creating, Importing, and Sharing

Python Modules: Creating, Importing, and Sharing

Introduction

Modules are the highest level organizational unit in Python. If you're at least a little familiar with Python, you've probably not only used ready modules, but also created a few yourself. So what exactly is a module? Modules are units that store code and data, provide code-reuse to Python

Introduction to Regular Expressions in Python

Introduction to Regular Expressions in Python In this tutorial we are going to learn about using regular expressions in Python, including their syntax, and how to construct them using built-in Python modules. To do this we¡¯ll cover the different operations in Python's re module, and how to use it in your Python applications.

What are

Using Machine Learning to Predict the Weather: Part 2

Using Machine Learning to Predict the Weather: Part 2 This article is a continuation of the prior article in a three part series on using Machine Learning in Python to predict weather temperatures for the city of Lincoln, Nebraska in the United States based off data collected from Weather Underground's API services. In the first article of the series,

How to Permanently Set $PATH in Linux

How to Permanently Set $PATH in Linux

Understanding the $PATH Variable

In this tutorial, we will show you how to permanently set your PATH on Linux. First off, why should you care? The $PATH variable, or just PATH, without the $ indicating variables, specifies a list of directories that impacts your computing platform's functionality in a critical way.

Using Machine Learning to Predict the Weather: Part 1

Using Machine Learning to Predict the Weather: Part 1 Part 1: Collecting Data From Weather Underground This is the first article of a multi-part series on using Python and Machine Learning to build models to predict weather temperatures based off data collected from Weather Underground. The series will be comprised of three different articles describing the major aspects of...

Python's os and subprocess Popen Commands

Python's os and subprocess Popen Commands

Introduction

Python offers several options to run external processes and interact with the operating system. However, the methods are different for Python 2 and 3. Python 2 has several methods in the os module, which are now deprecated and replaced by the subprocess module, which is the preferred option in

TensorFlow Neural Network Tutorial

TensorFlow Neural Network Tutorial TensorFlow is an open-source library for machine learning applications. It's the Google Brain's second generation system, after replacing the close-sourced DistBelief, and is used by Google for both research and production applications. TensorFlow applications can be written in a few languages: Python, Go, Java and C. This post is concerned

Python Linked Lists

Python Linked Lists A linked list is one of the most common data structures used in computer science. It is also one of the simplest ones too, and is as well as fundamental to higher level structures like stacks, circular buffers, and queues. Generally speaking, a list is a collection of single data

How to Exit in Node.js

How to Exit in Node.js In this tutorial we will show you the various ways of how to exit Node.js programs. You need to understand first that Node.js works on a single thread or main process. You can spawn additional child processes to handle extra work. Exiting the main process lets us exit

Python Exception Handling

Python Exception Handling This tutorial will give an introduction to what Python exceptions are, the most common types of exceptions, and how to handle raised exceptions with the try and except clauses.

What is a Python Exception?

A Python exception is a construct used to signal an important event, usually an error, that

Download Files with Python

Download Files with Python Downloading files from different online resources is one of the most important and common programming tasks to perform on the web. The importance of file downloading can be highlighted by the fact that a huge number of successful applications allow users to download files. Here are just a few web

Modified Preorder Tree Traversal in Django

Modified Preorder Tree Traversal in Django

Introduction

This article is an extension to a previous article titled, Recursive Model Relationships in Django, which demonstrated a way to utilize the bare-bones Django capabilities to define database-backed Classes that model a common use-case for a recursive relationship. The use case I intend to satisfy is the common relationship

How to Copy a File in Python

How to Copy a File in Python Introduction When it comes to using Python to copy files, there are two main ways: using the shutil module or the os module. All of the os methods we show here are methods that allow us to execute shell commands from our Python code, which we'll use to execute the...

Append vs Extend in Python Lists

Append vs Extend in Python Lists

Adding Elements to a List

Lists are one of the most useful data structures available in Python, or really any programming language, since they're used in so many different algorithms and solutions. Once we have created a list, often times we may need to add new elements to it, whether

Python Tutorial for Absolute Beginners

Python Tutorial for Absolute Beginners Python is one of the most widely used languages out there. Be it web development, machine learning and AI, or even micro-controller programming, Python has found its place just about everywhere. This article provides a brief introduction to Python for beginners to the language. The article is aimed at absolute

Python Circular Imports

Python Circular Imports

What is a Circular Dependency?

A circular dependency occurs when two or more modules depend on each other. This is due to the fact that each module is defined in terms of the other (See Figure 1). For example:
functionA():
functionB()
And
functionB():
functionA()
The code above depicts a fairly

TensorFlow: Save and Restore Models

TensorFlow: Save and Restore Models Training a deep neural network model could take quite some time, depending on the complexity of your model, the amount of data you have, the hardware you're running your models on, etc. On most of the occasions you'll need to save your progress to a file, so in case of

Python: List Files in a Directory

Python: List Files in a Directory I prefer to work with Python because it is a very flexible programming language, and allows me to interact with the operating system easily. This also includes file system functions. To simply list files in a directory the modules os, subprocess, fnmatch, and pathlib come into play. The following solutions

Linux: Find Files Containing Text

Linux: Find Files Containing Text This topic is essential knowledge for every user of UNIX, Linux, Solaris, OS X, and BSD. Furthermore, the LPI certification contains tricky questions about this. If you want to find files with a certain filename using the command line then use either the find or the locate commands. But if

Getting Started with AWS Lambda and Node.js

Getting Started with AWS Lambda and Node.js Once upon a time, not so long ago, a word caught my ear. Lambda. That struck a chord, remembering the good old days of playing Half-Life as a kid. Little did I know what AWS Lambda was, and how incredibly awesome it is. If you're intrigued, stick around. I'll only

Python Generators

Python Generators What is a Generator? A Python generator is a function that produces a sequence of results. It works by maintaining its local state, so that the function can resume again exactly where it left off when called subsequent times. Thus, you can think of a generator as something like a...

Symbolic Links in Unix/Linux

Symbolic Links in Unix/Linux Different file systems in the UNIX/Linux universe allow a variety of entries such as regular files, directories, sockets, named pipes, and links. In this article I will explain to you what links are, which types of links exist, how to create a symbolic link, and how to detect broken

scikit-learn: Save and Restore Models

scikit-learn: Save and Restore Models On many occasions, while working with the scikit-learn library, you'll need to save your prediction models to file, and then restore them in order to reuse your previous work to: test your model on new data, compare multiple models, or anything else. This saving procedure is also known as object

Recursive Model Relationships in Django

Recursive Model Relationships in Django

The Need for Recursive Relationships

There arises many times in the development of modern web applications where the business requirements inherently describe relationships that are recursive. One well known example of such a business rule is in the description of employees and their relationship to their managers, which are also

Serving Static Files with Flask

Serving Static Files with Flask

Setting Up Flask

Flask is a great choice for building web applications in a modular way using Python. Unlike Django and other analogues like Ruby on Rails, Flask is a micro-framework. This means it includes only what is necessary to do core web development, leaving the bulk of choices beyond

Parallel Processing in Python

Parallel Processing in Python

Introduction

When you start a program on your machine it runs in its own "bubble" which is completely separate from other programs that are active at the same time. This "bubble" is called a process, and comprises everything which is needed to manage this program call.

Read a File Line-by-Line in Python

Read a File Line-by-Line in Python

Introduction

Over the course of my working life I have had the opportunity to use many programming concepts and technologies to do countless things. Some of these things involve relatively low-value fruits of my labor, such

Command Line Arguments in Python

Command Line Arguments in Python

Overview

With Python being such a popular programming language, as well as having support for most operating systems, it's become widely used to create command line tools for many purposes. These tools can range from simple CLI apps to those that are more complex, like AWS' awscli tool. Complex tools

Reading and Writing CSV Files in Python

Reading and Writing CSV Files in Python What is a CSV File? A CSV (Comma Separated Values) file is a file that uses a certain formatting for storing data. This file format organizes information, containing one record per line, with each field (column) separated by a delimiter. The delimiter most commonly used is usually a comma. This...

Build a Web-Scraped API with Express and Cheerio

Build a Web-Scraped API with Express and Cheerio The outgrowth of the world wide web over the last couple of decades has led to an enormous amount of data being collected and plastered onto webpages throughout the internet. A corollary to this hyperbolic production and distribution of content on the web is the curation of a vast amount

Flask vs Django

Flask vs Django In this article, we will take a look at two of the most popular web frameworks in Python: Django and Flask. Here, we will be covering how each of these frameworks compares when looking at their learning curves, how easy it is to get started. Next, we'll also be looking

Node.js Express Examples: Rendered, REST, and Static Websites

Node.js Express Examples: Rendered, REST, and Static Websites Web development has come a long way since the WWW boom in the late 90's. We as developers now have infinite resources and tools at our disposal. The sheer versatility we have is mind-blowing. With the rise of Node.js and npm, JavaScript has become the de-facto most used programming

Differences Between .pyc, .pyd, and .pyo Python Files

Differences Between .pyc, .pyd, and .pyo Python Files In this article we go over the Python file types .pyc, .pyo and .pyd, and how they're used to store bytecode that will be imported by other Python programs. You might have worked with .py files writing Python code, but you want to know what these other file types do

Command Line Arguments in Node.js

Command Line Arguments in Node.js

What are Command Line Arguments?

Command line arguments are strings of text used to pass additional information to a program when an application is run through the command line interface (CLI) of an operating system. Command line arguments typically include information used to set configuration or property values for an

Array Loops in Bash

Array Loops in Bash In this article we'll show you the various methods of looping through arrays in Bash. Array loops are so common in programming that you'll almost always need to use them in any significant programming you do. To help with this, you should learn and understand the various types of arrays

Encoding and Decoding Base64 Strings in Node.js

Encoding and Decoding Base64 Strings in Node.js

What is Base64 Encoding?

Base64 encoding is a way to convert data (typically

How to use module.exports in Node.js

How to use module.exports in Node.js Using modules is an essential part of building complete applications and software systems using Node.js. In the absence of modules, your code would be fragmented and difficult to run, let alone maintain over time. But what is a module? And how exactly are you supposed to use module.exports...

Reading and Writing JSON Files with Node.js

Reading and Writing JSON Files with Node.js One of the best ways to exchange information between applications written in different languages is to use the JSON (JavaScript Object Notation) format. Thanks to its uniformity and simplicity, JSON has almost completely replaced XML as the standard data exchange format in software, particularly in web services. Given the extensive

Writing to Files in Node.js

Writing to Files in Node.js

Introduction

Writing to files is a frequent need when programming in any language. Like other programming languages, JavaScript with Node.js makes dealing with the file system intuitive through the use of a module dealing with the operating system's file system. The fs module contains the functionality for manipulating files

Get Query Strings and Parameters in Express.js

Get Query Strings and Parameters in Express.js

Introduction

We'll be going over how to extract information from a URL in Express.js. Specifically, how do we extract information from a query string and how do we extract information from the URL path parameters? In

Python's @classmethod and @staticmethod Explained

Python's @classmethod and @staticmethod Explained Python is a unique language in that it is fairly easy to learn, given its straight-forward syntax, yet still extremely powerful. There are a lot more features under the hood than you might realize. While I could be referring to quite a few different things with this statement, in this

Using Global Variables in Node.js

Using Global Variables in Node.js Hey guys, in today's article I want to talk about global variables in Node. This article is aimed at developers who are at a beginner to intermediate skill level working with Node. If you have never heard of global variables or worked with them, no need to worry. This article

Zsh vs Bash

Zsh vs Bash When we talk about UNIX based programming, it's usually about the shells, terminals, and the command line interfaces. The most prevalent shell in this regard is Bash but there are other variants available and used widely as well, like Zsh or the Z shell. In this article, we'll attempt to

Caret vs Tilde in package.json

Caret vs Tilde in package.json The package.json file is the heart of all npm packages and no matter what you might have in your project, one thing is for sure: there will always be a package.json file. Out of the many things contained within the package.json file, dependency management is what we

Substrings in Bash

Substrings in Bash Throughout your programming career you'll find that there are quite a few times you need to extract a substring from another string. Strings are one of the most common data structures, so this comes up often. I bet you could tell me how to do it in your favorite programming...

NPM Throws Error without Sudo

NPM Throws Error without Sudo If you know about JavaScript then you know about NPM; it¡¯s the default package manager for Node.js which is an open source runtime environment. Developers use NPM because not only does it provide an easy way to maintain the code but it also helps them when they have

Understanding JSON Web Tokens (JWT)

Understanding JSON Web Tokens (JWT) For a long time, user authentication on the web consisted of storing some very simple data (like a user ID) in the user's browser as a cookie. This worked pretty well (and still does for many applications), but sometimes you require some more flexibility. Traditionally, to get this flexibility you

Reading and Writing JSON to a File in Python

Reading and Writing JSON to a File in Python

Introduction

In this article, we'll be parsing, reading and writing JSON data to a file in Python. Over the last 5-10 years, the JSON format has been one of, if not the most, popular ways to serialize data. Especially in the web development world, you'll likely encounter JSON through one

Copying a Directory with SCP

Copying a Directory with SCP The Unix command scp (which stands for "secure copy protocol") is a simple tool for uploading or downloading files (or directories) to/from a remote machine. The transfer is done on top of SSH, which is how it maintains its familure options (like for specifying identities and credentials)

How to Format Dates in JavaScript

How to Format Dates in JavaScript For web applications especially, formatting a date is a pretty common task. Take a look at just about any website, whether it's an email client like Gmail, Twitter, or even on Stack Abuse articles, there is inevitably a date/time string somewhere on the page. In many cases, especially apps

The Node.js Request Module

The Node.js Request Module These days our web applications tend to have a lot of integrations with other services, whether it be interacting with a REST service like Twitter, or downloading images from Flickr. Using Node/JavaScript is one of the most popular languages to handle applications like this. Either way, you'll be making

Moment.js: A Better Date Library for JavaScript

Moment.js: A Better Date Library for JavaScript As any experienced programmer knows, dates and times are incredibly common in most application-level code. You might use dates for tracking the creation of an object, to track the time since an event occurred, or to save the date of an upcoming event. However, dates aren't easy to work with,

Testing Node.js Code with Mocha and Chai

Testing Node.js Code with Mocha and Chai Writing unit tests is one of those things a lot of people forget to do or just avoid altogether, but when you have them they're lifesavers. Test-driven development, which means you write your tests before your code, is a great goal to strive for, but takes discipline and planning when...

Node.js Async Await in ES7

Node.js Async Await in ES7 One of the most exciting features coming to JavaScript (and therefore Node.js) is the async/await syntax being introduced in ES7. Although it's basically just syntactic sugar on top of Promises, these two keywords alone should make writing asynchronous code in Node much more bearable. It all but eliminates

NeDB: A Lightweight JavaScript Database

NeDB: A Lightweight JavaScript Database When you think of a database the first things that might come in to your head might be MySQL, MongoDB, or PostgreSQL. While these are all great choices for storing data, they're all over-powered for the majority of applications. Consider a desktop chat application written with the Electron framework in

Read Files with Node.js

Read Files with Node.js One of the most common things you'll want to do with just about any programming language is open and read a file. With most languages, this is pretty simple, but for JavaScript veterans it might seem a bit weird. For so many years JavaScript was only available in the browser,

Node HTTP Servers for Static File Serving

Node HTTP Servers for Static File Serving One of the most fundamental uses of an HTTP server is to serve static files to a user's browser, like CSS, JavaScript, or image files. Beyond normal browser usage, there are thousands of other reasons you'd need to serve a static files, like for downloading music or scientific data. Either

How to Send Emails with Gmail using Python

How to Send Emails with Gmail using Python There are quite a few ways to send email with Python, whether it be through a 3rd party library like with boto and SES, or through an email protocol like SMTP. While the subject of using Python to send emails may seem like it's been done to death, there are

Bookshelf.js: A Node.js ORM

Bookshelf.js: A Node.js ORM One of the most common resources you'll interact with in a language like Node.js (primarily a web-focused language) are databases. And with SQL being the most common of all the different types, you'll need a good library to help you interact with it and its many features. Bookshelf.js

The Python Property Decorator

The Python Property Decorator It is often considered best practice to create getters and setters for a class's public properties. Many languages allow you to implement this in different ways, either by using a function (like person.getName()), or by using a language-specific get or set construct. In Python, it is done using @property

NPM Error "failed to fetch from registry" when Installing Module

NPM Error "failed to fetch from registry" when Installing Module When using NPM to install a module for a project, you may encounter a frustrating error like this: $ npm install express --save npm http GET https://registry.npmjs.org/express npm ERR! Error: failed to fetch from registry: express npm ERR! at /opt/node0610/lib/node_modules/npm/lib/utils/...

How to Uninstall Node.js from Mac OSX

How to Uninstall Node.js from Mac OSX If you read one of my earlier posts on how to install Node.js, you probably noticed there are quite a few ways to install it on your computer. This could be from a package manager, from the source code, or from a pre-compiled binary distribution. So, what do you

Node.js Websocket Examples with Socket.io

Node.js Websocket Examples with Socket.io

What are Websockets?

Over the past few years, a new type of communication started to emerge on the web and in mobile apps, called websockets. This protocol has been long-awaited and was finally standardized by the IETF in 2011, paving the way for widespread use. This new protocol opens up

Python: Check if a File or Directory Exists

Python: Check if a File or Directory Exists There are quite a few ways to solve a problem in programming, and this holds true especially in Python. Many times you'll find that multiple built-in or standard modules serve essentially the same purpose, but with slightly varying functionality. Checking if a file or directory exists using Python is definitely

Setting up a Node.js Cluster

Setting up a Node.js Cluster We all know Node.js is great at handling lots of events asynchronously, but what a lot of people don't know is that all of this is done on a single thread. Node.js actually is not multi-threaded, so all of these requests are just being handled in the event

Install Python on Mac OSX

Install Python on Mac OSX As with just about any open source software package, there are quite a few ways to install Python on Mac OSX. I figured it would be helpful to detail a few of the easiest ways to install Python, including the following: These are the most

Python async/await Tutorial

Python async/await Tutorial Asynchronous programming has been gaining a lot of traction in the past few years, and for good reason. Although it can be more difficult than the traditional linear style, it is also much more efficient. For example, instead of waiting for an HTTP request to finish before continuing execution, with

How to Create a Node.js CLI Application

How to Create a Node.js CLI Application One of my absolute favorite things about Node is how easy it is to create simple command line interface (CLI) tools. Between argument parsing with yargs to managing tools with npm, Node just makes it easy. Some examples of the kinds of tools I'm referring to are:

Using NVM to Install Node

Using NVM to Install Node Within the past 6 months alone, Node.js has gone from v0.12.x to v5.1.x. There were 35+ releases in that time period, with each one adding some significant functionality or bugs fixes. A big part of this jump was the merging of io.js in to...

Learn Node.js: A Beginner's Guide

Learn Node.js: A Beginner's Guide JavaScript is undoubtedly one of the most popular programming languages out there today, and for good reason. It can easily be run in your browser, on a server, on your desktop, or even on your phone as an app. One of the most popular and easiest ways to write JavaScript

How to Fix "WARNING: UNPROTECTED PRIVATE KEY FILE!" on Mac and Linux

How to Fix "WARNING: UNPROTECTED PRIVATE KEY FILE!" on Mac and Linux Have you run in to the warning message below, and don't know how to fix it?
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE!  @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '/path/to/my/key.pem' are too open.
It is required

Markdown by Example

Markdown by Example

Jump To

As we all know, HTML has been around a long time and is used to build every website on the internet, but

How to Install Node.js on Ubuntu

How to Install Node.js on Ubuntu For as popular as this JavaScript run-time has become, you might be surprised to find out that it actually still isn't very easy to install Node.js on Ubuntu and other Linux distributions. It's still more of a manual process than it should be. I find myself Googling this just

Securing Your Node.js App

Securing Your Node.js App By default, Node.js is fairly secure by itself. Although, there are definitely things you have to watch out for. If your Node web-app starts to get more and more popular, for example, you'll need to be thinking more and more about security to ensure that you're keeping your users'

Why Beginners Should Learn Python

Why Beginners Should Learn Python From some of my other posts you've probably noticed that I'm a big fan of Node.js. While this is true, and has been my go-to language for a while now, I don't always recommend it to everyone. Just starting out in programming and computer science can be a bit

The Best Machine Learning Libraries in Python

The Best Machine Learning Libraries in Python

Introduction

There is no doubt that neural networks, and machine learning in general, has been one of the hottest topics in tech the past few years or so. It's easy to see why with all of the really interesting use-cases they solve, like voice recognition, image recognition, or even music

How to Write Express.js Middleware

How to Write Express.js Middleware Introduction Do you ever wonder what's going on within all of the Express.js middleware that you're adding to your webapp? It's actually pretty impressive what kind of functionality you can add to your apps with just one line of code, or a few: // requires... var app = express(); app.use(...

Implementing User Authentication the Right Way

Implementing User Authentication the Right Way

Introduction

Writing about Passport.js the other day got me thinking about how authentication actually works, and more importantly how many ways it can go wrong. The naive solution is to just store a user's username/email and password directly in the database, and then check the submitted password against

How to Send an Email with boto and SES

How to Send an Email with boto and SES

Introduction

Pretty much every user-based app and website needs to send an email to the user at some point, so eventually you'll have to deal with the joyous world of programmatic emailing. There are quite a few services popping up to help you with this, but with every app having

Adding Authentication to Express with Passport

Adding Authentication to Express with Passport

Introduction

User authentication is one of those things that you probably don't think too much about, but just about every website or app out there requires it. If you had to implement authentication yourself, could you? Well don't worry, you probably won't have to. Since this functionality is so common,

Running Node Apps with Forever

Running Node Apps with Forever

Introduction

For many people, actually running your code in a production environment is an afterthought, and just writing the code is where the real challenge is at. While this is mostly true in my experiences, finding a reliable and easy way to run your app can be pretty difficult itself.

Run Periodic Tasks in Node with node-cron

Run Periodic Tasks in Node with node-cron

What is Cron?

Cron is a scheduling utility that runs as a daemon process in the background of Unix-like systems. It's extremely popular for running periodic tasks, which can be anything you choose, like initiating a backup or clearing data from a database. You can add tasks to Cron via

Useful Node Packages You Might Not Know About

Useful Node Packages You Might Not Know About

Introduction

Some of you Node veterans have probably heard of a few of these packages before, but I'm hoping from this article you'll find some really useful ones that you'd never heard of, like I did. I tend to forget there are so many packages out there, so I did

Speeding Up Arduino

Speeding Up Arduino

Introduction

For many of us, we started out programming on desktops and servers, which seemed to have infinite memory and processing power (well, depending on when you started programming, I guess). There was little reason to optimize your code since you weren't likely to exceed the system's limits anyway. And

The Ultimate Guide to Configuring NPM

The Ultimate Guide to Configuring NPM Introduction Setting Parameters List of Possible Parameters Access Control/Authorization Caching General Development Networking Registry Conclusion Introduction The Node Package Manager, or npm, is one of the best parts about Node, in my opinion. Package management can really make or break a language, so ensuring that it is easy to...

How to Program an Arduino with JavaScript

How to Program an Arduino with JavaScript

Introduction

As you probably know (or have heard), Arduino is a great platform to learn and hack on electronics that would otherwise be very difficult to use for a beginner. Its a great introduction in to programming, electronics, and engineering in general. But even then, as much of an improvement

Neural Networks in JavaScript with Brain.js

Neural Networks in JavaScript with Brain.js

Introduction

Over the last few years especially, neural networks (NNs) have really taken off as a practical and efficient way of solving problems that can't be easily solved by an algorithm, like face detection, voice recognition, and medical diagnosis. This is largely thanks to recent discoveries on how to better

What is Arduino?

What is Arduino?

Arduino Explained

One of the most common questions I see from people that are just entering electronics and programming is: what is Arduino? Well, Arduino is a platform for microcontroller devices that makes embedded programming much easier than traditional methods. Thanks to Arduino's simplicity and ease-of-use, embedded systems and programming

How to Create C/C++ Addons in Node

How to Create C/C++ Addons in Node Node.js is great for a lot of reasons, one of which is the speed in which you can build meaningful applications. However, as we all know, this comes at the price of performance (as compared to native code). To get around this, you can write your code to interface

6 Easy Ways to Speed Up Express

6 Easy Ways to Speed Up Express

Introduction

Express is by far the most popular web framework for Node.js thanks to its simple API, available plugins, and huge community. Thanks to the community, there is no shortage of documentation and examples on how to use the core Express API, which is great, but it's not always

Getting Started with Camo

Getting Started with Camo Edit: Updated code to Camo v0.12.1

Introduction

First of all, Camo is a new class-based ES6 ODM for MongoDB and Node. With mainstream ES6 quickly approaching us, I thought we were long overdue for an ODM that took advantage of the new features, so I created Camo. What

Avoiding Callback Hell in Node.js

Avoiding Callback Hell in Node.js

Introduction

I'll admit that I was one of those people that decided to learn Node.js simply because of the buzz around it and how much everyone was talking about it. I figured there must be something special about it if it has this much support so early on in

Introducing Camo: A class-based ES6 ODM for Mongo-like databases

Introducing Camo: A class-based ES6 ODM for Mongo-like databases Edit: Updated Camo code to v0.12.1 What is Camo? Camo is an ES6 ODM with class-based models. A few of its main features are: dead-simple schema declaration, intuitive schema inheritance, and support for multiple database backends. A simple Camo model might look like this: var Document = require('camo')...

ES6 Iterators and Generators

ES6 Iterators and Generators Iterators and generators are usually a secondary thought when writing code, but if you can take a few minutes to think about how to use them to simplify your code, they'll save you a lot of debugging and complexity. With the new ES6 iterators and generators, JavaScript gets similar functionality

ES6 Symbols

ES6 Symbols

Introduction

Of all the new features in ES6, Symbols might be one of the most interesting to me. I've never been a Ruby developer, so I've never actually seen or used these primitive types in practice. Its an interesting concept, and I'll be diving in to the essentials throughout this

ES6 Classes

ES6 Classes

Introduction

There's no doubt that JavaScript popularity has skyrocketed the last few years, and its quickly becoming the language of choice for not only client-side code, but server side as well. I had never been a huge fan of JavaScript, it just seemed too messy and unnecessarily confusing. While I

Example: Upload a File to AWS S3 with Boto

Example: Upload a File to AWS S3 with Boto

Example Code

Amazon Web Services (AWS) is a collection of extremely popular set of services for websites and apps, so knowing how to interact with the various services is important. Here, we focus on the Simple Storage Service (S3), which is essentially a file store service.

Example: Apache Camel with Blueprint

Example: Apache Camel with Blueprint Here we present a fully-working Apache Camel Blueprint project. It provides example code for building routes, creating beans, and deploying to ServiceMix with Blueprint.

Blueprint

In short, Blueprint is much like Spring. Really, its a lot like Spring, but with slight differences. The Blueprint Container specification was created by the

How to Exploit the Heartbleed Bug

How to Exploit the Heartbleed Bug First we explained how it worked, and now, thanks to Jared Stafford (and stbnps on Github for explanations) we can show you how to exploit it. Heartbleed is a simple bug, and therefore a simple bug to exploit. As you'll see below, it only takes about a single page of

How to Create Keys for PGP

How to Create Keys for PGP Just about everyone knows that its important to encrypt your data these days, and there are quite a few ways to go about it. As simple as the concept of encryption sounds - "use a key to encrypt your data" - its not always straightforward to do. Here,

Heartbleed Bug Explained

Heartbleed Bug Explained As you may have heard, there is a new OpenSSL bug out there, and its a bad one. This isn't one of those bugs or hacks that you hear about in the news and safely ignore like you always do. It affects around 66% of all internet servers out there,...

Example: REST Service with Apache Camel

Example: REST Service with Apache Camel With the extreme prevalence of mobile apps, web apps, and desktop apps, REST services are more important than ever to provide data to it's users. This data could be used for the native app, or for 3rd party developers to expand your service's reach in to other apps. Either way,

How to Use Threads in Java Swing

How to Use Threads in Java Swing Programming isn't easy, and adding a user interface around functionality can really make life difficult. Especially since not all UI frameworks are thread safe (including Swing). So how do we efficiently handle the UI, run the worker code, and communicate data between the two, all while keeping the UI responsive?

How to Run a Bash Script on Login

How to Run a Bash Script on Login Eventually, you may find yourself wanting to run a particular script every time you log in to a Unix machine (SSH hop to another machine, see a detailed system status, etc.) or, you maybe you'd like to improve the experience for all the users on your machine (i.e. show

Pyramid Explained

Pyramid Explained

What is Pyramid

Pyramid is a Python web framework created from the combination of Pylons and repoze.bfg, resulting in a flexible, easy to use framework. Pyramid puts much of its focus in being flexible, so no application will be constrained by decisions made by the Pyramid creators. For example,

XSLT Explained

XSLT Explained

What is XSLT?

XSLT is, in my opinion, similar to the likes of the Mako and Chameleon templating engines. XSLT is mainly used to transform some type of structured markup language (like XML) to another form, like HTML, JSON, or even another XML document. This is done through the use

How to Tunnel HTTP with SSH

How to Tunnel HTTP with SSH Tunneling your traffic is the process of sending data, like HTTP, over a different protocol. In this case, we'll show you how to send your browser traffic over the SSH protocol. So why would you ever want to do this? By tunneling your traffic, you're basically using the destination computer/

Python Virtual Environments Explained

Python Virtual Environments Explained

What is VirtualEnv?

The virtualenv tool creates an isolated Python environment (in the form of a directory) that is completely separate from the system-wide Python environment. What this really means is that any settings, 3rd-party packages, etc. from the system-wide environment do not appear in the virtual environment, so it's

How to Develop a Maven Project in Eclipse

How to Develop a Maven Project in Eclipse As great as Maven is, it does make things a bit more complicated, including how you develop projects in different IDEs. If Maven is supposed to make building projects easier (among other things), but you can't use it in conjunction with an IDE, then what's the point? You shouldn't have...

How to use PGP in Camel Routes

How to use PGP in Camel Routes Apache Camel is a powerful enterprise routing framework that can be used to send information any which way, with just about any protocol you'd want to use. And it's no secret how important encryption is, so using the two together just makes sense. PGP, specifically, stands for "Pretty Good

End of the Kickstarter

End of the Kickstarter I'm a little late in posting this (8 days late, to be exact), but the Pixy Kickstarter is over and we're on to the next phase of the project. Here's how we did: We can't

Regex: Splitting by Character, Unless in Quotes

Regex: Splitting by Character, Unless in Quotes Many times when you're parsing text you find yourself needing to split strings on a comma character (or new lines, tabs, etc.), but then what if you needed to use a comma in your string and not split on it? An example of this could be a large number. So

Example: Adding Autocomplete to JTextField

Example: Adding Autocomplete to JTextField Autocomplete can be very useful in just about any application, but its not trivial to implement. So here is a quick example of how you might do it in Java's Swing framework with JTextField (it should also work with JTextArea with only a few modifications). This example is a modified

How to Configure Network Settings in Java

How to Configure Network Settings in Java

Proxies

Setting the proxy server and port:
System.setProperty("http.proxyHost", "proxy.example.com");

System.setProperty("http.proxyPort", "80");
For an HTTPS proxy, just change 'http' to 'https' for each property. Or you can just use the system's proxies:
System.setProperty("

Example: Loading a Java Class at Runtime

Example: Loading a Java Class at Runtime Java isn't the most dynamic language around, but with some careful planning and flexibility you can make your programs a bit more dynamic by loading classes at runtime. This might be good for when you want to make your application more extensible and allow certain modules within it to be

How to Install Maven

How to Install Maven

Windows

CMUcam Pixy Explained

CMUcam Pixy Explained What is Pixy? Pixy is a fully open source embedded camera that has a dual core ARM processor, USB/I2C/UART/SPI communication, and built-in computer vision algorithms. Pixy, also known as the CMUcam5, is the 5th revision of the CMUcam, started by Anthony Rowe of Carnegie Mellon University. Pixy...

What is Maven?

What is Maven?

Maven Explained

Apache Maven is a build automation tool for Java projects. Think of Ant, or Make, but much more powerful and easier to use. If you've ever had to deal with building a Java project with dependencies or special build requirements then you've probably gone through the frustrations that

Introducing Pixy

Introducing Pixy
Introducing Pixy (aka CMUcam5). Its an embedded camera that has a dual core ARM processor, USB/I2C/UART/SPI communication, and built-in vision algorithms. I started working on this camera back in September 2012 as a graduate student at Carnegie Mellon, working with Rich LeGrand of [Charmed Labs](http://charmedlabs.

I Started a Blog

I Started a Blog I started a blog. Obviously. But just about everyone out there has a blog these days, so what makes this one so special? Nothing. More than likely it'll be the same or similar to all the rest. So what's the point? As I see it, this website can still serve